Results 1 to 4 of 4
  1. #1
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    31

    Default 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. #2
    Skaarj
    Join Date
    Mar 2012
    Location
    Edmonton
    Posts
    24
    Gamer IDs

    Gamertag: handsomePATT

    Default

    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

  3. #3
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    31

    Default

    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.
    Last edited by jfergus7; 05-05-2012 at 09:28 AM.

  4. #4
    Skaarj
    Join Date
    Mar 2012
    Location
    Edmonton
    Posts
    24
    Gamer IDs

    Gamertag: handsomePATT

    Default

    Haha no worries. Happens to everyone.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.