Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: problem creating input zones

  1. #1
    nickthecoder
    Guest

    problem creating input zones

    I used the tutorial How To Create a Basic iOS game to create my own GameInfo, but I can't add input zones to it through the ini files or through kismet. I extended the GameInfo from FrameworkGame, can someone point out my problem?

  2. #2
    Tom Havlik
    Guest
    Input zones are very strange. You define them in DefaultGame.ini, and activate them in code.

    http://udn.epicgames.com/Three/MobileInputSystem.html

    Go look at the example that is there for UberMove or whatever, then look at the Epic Citadel's controller with the assignment and operations performed upon the input groups and controls. Assigning MOBILE_AForward to the input key will automagically move your pawn forward. There's one for strafe that can be applied to HorizontalInputKey.

    Good luck!

  3. #3
    nickthecoder
    Guest
    Yeah, I've looked at that... What file do you activate them with? I saw it said sometime about MobilePlayerInput, but couldn't find anything in that file

  4. #4
    nickthecoder
    Guest
    and also, why can't I add them through kismet, shouldn't that work?

  5. #5
    Curious
    Guest
    Quote Originally Posted by nickthecoder View Post
    Yeah, I've looked at that... What file do you activate them with? I saw it said sometime about MobilePlayerInput, but couldn't find anything in that file
    It's placed in in the folder called GameFramework (Development/src directory in your UDK install).

  6. #6
    nickthecoder
    Guest
    Yes, I found the file, I just can't find in the file where you activate the input zones

  7. #7
    Curious
    Guest
    Quote Originally Posted by nickthecoder View Post
    Yes, I found the file, I just can't find in the file where you activate the input zones

    You don't actually modify that specific file, you use its functionality in other code by calling it's functions, like FindZone("UberStickMoveZone") etc.

    That's done in the Player Controller class.

    Code:
    function SetupZones()
    {
    	// Cache the MPI
    	MPI = MobilePlayerInput(PlayerInput);
    
    	StickMoveZone = MPI.FindZone("UberStickMoveZone");
    	StickLookZone = MPI.FindZone("UberStickLookZone");
    	FreeLookZone  = MPI.FindZone("UberLookZone");
    }
    This is an example... You declare before hand a reference to the MPI:

    Code:
    var MobilePlayerInput MPI;
    and also a few zones:

    Code:
    var MobileInputZone StickMoveZone;
    var MobileInputZone StickLookZone;
    var MobileInputZone FreeLookZone;
    And then when you capture the zones from the ini file, you'll use that to create define actions in the player controller that will act upon when those zones are used. Hope it makes sense =)

    End, oh, you can also define multiple groups to which some zones belong and activate them when necessary, really useful:

    Code:
    function ActivateControlGroup()
    {
    	MPI.ActivateInputGroup("UberGroup");
    }

  8. #8
    nickthecoder
    Guest
    Awesome, thanks!! So does activating the group make all the things in that group appear?

  9. #9
    Curious
    Guest
    Quote Originally Posted by nickthecoder View Post
    Awesome, thanks!! So does activating the group make all the things in that group appear?
    That's right.

  10. #10
    daimaku
    Guest
    Quote Originally Posted by nickthecoder View Post
    Awesome, thanks!! So does activating the group make all the things in that group appear?
    have you solved the issue with the input zones ? can you explain a bit to me?, i'm having problem with my input zones.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •