Movements
arbetnuhiji
Member, PRO Posts: 11
I have a problem i want to have 2+ players on scene lets say 2 and i want when i select one player movements righ,left,up,down to appear and when ill move lets say left or right i want only the player that is selected to move on that direction is that possible to do because i cant figure it out.
Comments
Sure. Make a game level attribute integer attribute "player" set it to 1 as a default. Wrap the move rules for each actor in a rule inside them.
Actor 1.
Add a rule
When touch is pressed
Change attribute game.player to 1
Rule
When game.player = 1
Your move rules for actor 1 inside this rule
Actor 2
Add rule
When touch is pressed
Change attribute game.player to 2
Rule
When game.player = 2
Your move rules for actor 2
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
it seem logical i did it but there is a problem when i touch the player imeddiately starts to move in a direction without waiting for the right buton to be pressed but this i s a good start i will try to figure it out.thank you.
nope i cant make it work there is something missing
ok i managed to make the first player when i touch him he moves fine but when i touch the second player it doesnt move at all because the first player stays selected all i need is when i select the second player the first player to be deselected
The code above works. If you did it like I showed when you touch the second actor it will cut out the other actor. Post a sceenshot of your rules.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Yes i did it it is working perfectly now i have another problem i opened a thread for that but thank you very much you was very helpful