Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Handling input touch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling input touch

    Hi I am trying to mobile input to work from http://udn.epicgames.com/Three/MobileInputSystem.html

    I followed exactly what they have for the picking example but when I compile i get this error.

    Error, Delegate assignment failed (OnInputTouch): Invalid or unknown function 'HandleInputTouch'

    and its refering to this park of the code
    Code:
    event InitInputSystem()
    {
      Super.InitInputSystem();
    
      //Get a reference to the local MobilePlayerInput
      MPI = MobilePlayerInput(PlayerInput);
    
      //Accessing the input handler function to the delegate
      //THIS LINE IS CAUSING THE ERROR
      MPI.OnInputTouch = HandleInputTouch;
    
      //get the screen dimensions (used to transform to relative screen coords for the DeProject)
      LocalPlayer(Player).ViewportClient.GetViewportSize(ViewportSize);
    }
    Thanks for any help

  • #2
    do you have this function somewhere in that same script?

    Code:
    function HandleInputTouch(int Handle, EZoneTouchEvent Type, Vector2D TouchLocation, float DeviceTimestamp, int TouchpadIndex)
    {
    	//when a touch happens its called here
    }

    MPI.OnInputTouch = HandleInputTouch; this assigns the HandleInputTouch function to the OnInputTouch Delegate in the MobilePlayerInput script

    Comment


    • #3
      Yeah I do right after it but for some reason its not recognizing it or something


      EDIT: I apologize I was missing a } in the function above HandleInputTouch so I guess thats why it couldnt access it, Thanks for your help and sorry it was such a stupid mistake.

      Comment


      • #4
        Haha no worries. Happens to everyone.

        Comment

        Working...
        X