Multi-touch with Lime?

I’ve been working through the Lime tutorials and am not sure that multitouch is working like I would expect.

As an example, I have tutorial 12 (Collectible Items) running on my phone so that I can try out the multi touch functionality (not possible on the simulator).

If I have the character moving with a movement arrow depressed and held, and then jump, the character jumps (multi-touch as one would hope) but then I have to repress the movement arrow to get any movement going after having executed the jump.

I would have expected the movement arrow to have continued registering having been “depressed” and having the character continue to move accordingly. Instead I have to repress the movement arrow after jumping.
Here’s the onButtonLeftEvent function:

local onButtonLeftEvent = function(event)  
  
 if event.phase == "press" then  
 player.direction = DIRECTION\_LEFT  
 player.xScale = player.direction  
 player.state = STATE\_WALKING   
 else  
 player.state = STATE\_IDLE  
 end  
  
 player:prepare("anim" .. player.state)  
  
 player:play()  
end  

I was thinking I needed a different event.phase type inorder to continue to “read” the event while the jump executes. Any thoughts?

It just doesn’t quite feel polished to have to release the movement arrow and then repress it after having executed a jump.

Thanks in advance for any insight on this :slight_smile: [import]uid: 105707 topic_id: 24479 reply_id: 324479[/import]

I had meant to mention, the ui.lua that is referenced in this example only has a “press” and “release” event for the buttonEvent.phase… I’m not sure if that is part of the issue (needing a different event type that would remain registered during multitouch) [import]uid: 105707 topic_id: 24479 reply_id: 99054[/import]

Make sure you have the latest version of ui.lua that allows for multitouch.

The issue may in fact just be an issue with the actual jumping/moving code rather than multitouch though. [import]uid: 119420 topic_id: 24479 reply_id: 99882[/import]