toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Actors Following Other Actors
Xenoncam
Member
Posts:
17
June 2011
edited November -1
in
Working with GS (Mac)
I was wondering if you can make like enemies follow the hero if you can please help me
Comments
JohnPapiomitis
Member
Posts:
6,256
June 2011
make 2 real attirubtes. Call them herox and heroy
in the hero actor
constrain attribute hero x to self position x
constrain heroy to self posiiton y
then in whatver you want to follow the hero, constrain self position y to hero y and constrain self position x to herox-50
That will make it follow always 50 pixels behind it. You can change the 50 to be whatver offset you want
cheers
Xenoncam
Member
Posts:
17
June 2011
thank you so much
Xenoncam
Member
Posts:
17
June 2011
im sorry i am kind of confused in what you are saying
Xenoncam
Member
Posts:
17
June 2011
never mind i got it
Sign In
or
Register
to comment.
Comments
in the hero actor
constrain attribute hero x to self position x
constrain heroy to self posiiton y
then in whatver you want to follow the hero, constrain self position y to hero y and constrain self position x to herox-50
That will make it follow always 50 pixels behind it. You can change the 50 to be whatver offset you want
cheers