touch control help
joey2e
Member Posts: 99
Hello all
Have had a look through the tutorials and cant seem to find the answer to my problem:
My game requires the sprite to follow my finger once I select it,
so in essence I want to select the particular character by touching him/her, then the character to follow the trail I set out with my finger, the character would be unselected when I press the next character.
Any help on how to achieve this would be greatly appreciated
Joe
Have had a look through the tutorials and cant seem to find the answer to my problem:
My game requires the sprite to follow my finger once I select it,
so in essence I want to select the particular character by touching him/her, then the character to follow the trail I set out with my finger, the character would be unselected when I press the next character.
Any help on how to achieve this would be greatly appreciated
Joe
Comments
- if actor is touched -> change attribute character_select = 1 (put here a different number for every character).
In character #1 put a rule:
- if game.character_select=1
---- acceletate toward -> set the values Positionx = device.mouse_position.x and Positiony = device.mouse_position.y, relative to scene.
Of course you have to change the rule for every actor. i.e., for actor #2 it will be..
- if game.character_select=2 etc etc.
bye