Hi!
Trying to make my character keep on jumping as long as the button is pressed… Been searching for this but havn’t figured out how to make it work…
The canjump argument is a check to see if the character i touching the ground or not…
Any help would be highly appreciated!
All my best!
[lua]local function onTouch( event )
local touched = event.target
if ( canjump == “true” and event.phase == “began” ) then
stick:applyForce( touched.xForce, touched.yForce, stick.x, stick.y )
end
end
for i=1,#touchObjects do
touchObjects[i]:addEventListener ( “touch”, onTouch )
end[/lua] [import]uid: 187595 topic_id: 32454 reply_id: 332454[/import]