toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Record Character Position
GSExtreme
Member
Posts:
65
April 2011
edited November -1
in
Working with GS (Mac)
I want to record constantly the character position and when he jumps a bit out of the screen (the height is 800) so when he exceeds 900, his life is set to 0.....
Comments
UtopianGames
Member
Posts:
5,692
April 2011
You need 2 real attributes charX charY (call these what you want)
Now in your character actor use 2 constrain attributes charX to self.PositionX and charY to self.PositionY
For the jump out of screen you can do 1 of 2 things.
Either use a rule in your character actor if self.positionY >900 change attribute life to 0
OR
If you have another actor like a controller you could use if charY > 900 change life to 0.
Darren.
GSExtreme
Member
Posts:
65
April 2011
thanks a lot
Sign In
or
Register
to comment.
Comments
Now in your character actor use 2 constrain attributes charX to self.PositionX and charY to self.PositionY
For the jump out of screen you can do 1 of 2 things.
Either use a rule in your character actor if self.positionY >900 change attribute life to 0
OR
If you have another actor like a controller you could use if charY > 900 change life to 0.
Darren.