TOUCH SENSITIVE JUMP??
app-etite
Member Posts: 139
Hi Guys
thanks to mynameisace and johnpapiomitis ive got my character jumping nicely.
but does anybody know how to change the height of the jump according to how long the player touches the screen?
Thanks
-App-etite
thanks to mynameisace and johnpapiomitis ive got my character jumping nicely.
but does anybody know how to change the height of the jump according to how long the player touches the screen?
Thanks
-App-etite
Comments
Set it to 200.
In the jumpp button, have when touch is pressed and touch is inside, every 1 second change jump buttton to jump button +100.
Then in the jump button have another rule when touch is released change jump height to 100
Then in your player for the jump, where you put the rule i told you when jump =1 change self motion linear y to self motion linear y +200, change that to be change self motion linear y to self motion linear y +jump height.
So waht your doing is its jumping to whatever number jump height is. Its set to 200 so one touch will be a normal jump. But when you hold it it adds 100 to that number every second, making you jump higher the longer you hold it. Then when you realease it changes that number back to a normal jump.
I
Try that when I get home. the only thing im thinking is do i have to create an invisible actor across the screen like i have for my jump attribute? because if i have two invisible actor on top of each other, will the one on the top layer take priority making the actor with my other attributes underneath do nothing? or will it recognise both?
Thanks
-App-etite
Also where i put touch is released change to 100, make that 200 (or whatever the jump height attribute is set to start at) sorry it would let me edit.
How i told you will work, you just might have to tweak the+100 to +50 or the every 1 second to every.5 seconds or whatever you want
cheers
by the way Im assuming to set attribute to 200 i use change attribute?
-app-etite