toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
move then when hit stop
prince.studios
Member
Posts:
77
January 2013
in
Working with GS (Mac)
hi every body
i wanted to know how to make an actor stop when it hits a wall or something
Comments
Braydon_SFX
Member, Sous Chef, Bowlboy Sidekick
Posts:
9,273
January 2013
You can create a global or self boolean attribute - whichever you prefer. Call it "Hit-Stop", or something around there.
Now, you can use the move behavior or whatever you need. Say your using the move behavior. Take that move behavior, and wrap it in a rule that states:
When attribute self.Hit-Stop is false,
Move
Now, create another rule:
when overlaps or collides with wall,
Change attribute self.Hit-Stop to true
This will stop your actor. This is only one way (and maybe the easiest) of doing this.
Hope this helps
prince.studios
Member
Posts:
77
January 2013
edited January 2013
Hi when it hits it bounce or it goes in the opposite way
Braydon_SFX
Member, Sous Chef, Bowlboy Sidekick
Posts:
9,273
January 2013
You need to change the bounciness on each actor to 0 (under physics in each actor)
Sign In
or
Register
to comment.
Comments
Now, you can use the move behavior or whatever you need. Say your using the move behavior. Take that move behavior, and wrap it in a rule that states:
When attribute self.Hit-Stop is false,
Move
Now, create another rule:
when overlaps or collides with wall,
Change attribute self.Hit-Stop to true
This will stop your actor. This is only one way (and maybe the easiest) of doing this.
Hope this helps