New Gs user,help with Actor following other/closest actors?
dereklarue
Member Posts: 121
Im new at using gamesalad, just bought the express.
So hi to everyone! I got a question.
How do i make it so one actor follows another/closest actor?
I want actor 1 to follow the closest actor 2.
So hi to everyone! I got a question.
How do i make it so one actor follows another/closest actor?
I want actor 1 to follow the closest actor 2.
Comments
sorry for vagueness, but at work and away from GameSalad...but still able to kill time during video renders to browse the forum...
For instance, I would create two Game Attributes: PlayerPosX and PlayerPosY.
In the Player Actor, I would Constrain PlayerPosX and PlayerPosY to the Player's actual position.
In the Enemy Actor, I would then use the MoveTo or some other AI technique using the Actor's position against the PlayerPosX/Y that's accessible from within that Actor.
`
UPDATE: Looks like they have it in the Wiki already, exactly as I was picturing...
http://gamesalad.com/wiki/how_tos:gsc_follow_another_actor?s[]=move&s[]=actor
`
Thanks for the idea, any help is better than no help
@ BeyondtheTech:
Thanks for the help and the link,
Using Global attributes looks like the only way to do this, thanks
Didnt think to browse the wiki..