toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Gamesalad boomerang?
michaelcleary
Member
Posts:
3
October 2011
edited November -1
in
Working with GS (Mac)
I was wondering how I could throw a boomerang in one direction relative to the actor, and have it return to me. Any help is appreciated.
Comments
old_kipper
Member
Posts:
1,420
October 2011
I would experiment with two actors. On that accels towards the second, and the second that accels towards 'home' when the first gets close.
michaelcleary
Member
Posts:
3
October 2011
I have the motion down, i just need to know how to make the boomerang move in the direction im facing instead of 1 direction all the time.
wormil
Member
Posts:
127
October 2011
I have a global variable iDirection
i give an initial starting direction, iDirection = 1 // right
if( fire && iDirection = 1)
move 0 direction
if ( fire && iDirection = 2)
move 180 direction
so effectively you know which direction to spawn from etc, based on the direction you are facing.
michaelcleary
Member
Posts:
3
October 2011
im probs stupid, but i dont understand...
JohnPapiomitis
Member
Posts:
6,256
October 2011
always best to search first
http://gamesalad.com/forums/topic.php?id=33222
Sign In
or
Register
to comment.
Comments
i give an initial starting direction, iDirection = 1 // right
if( fire && iDirection = 1)
move 0 direction
if ( fire && iDirection = 2)
move 180 direction
so effectively you know which direction to spawn from etc, based on the direction you are facing.
http://gamesalad.com/forums/topic.php?id=33222