GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to move duplicates of the same actor in different directions.

colejohcolejoh Posts: 0Member

I am making an arcade-like-shooter. To direct the bullet, I set the direction as the angle of where the user touches the screen. When I rapid fire, the bullets that were going to angle x change direction and go to angle y (second place user fired bullet). How can I make it so once a bullet has a direction, it stays that direction?

Comments

  • colandercolander Posts: 1,610Member

    It is hard to answer your question without knowing how you have setup your rules. Upload a test project and someone will be able to help you fix it.

  • tatiangtatiang Posts: 11,753Member, Sous Chef, PRO, Senior Sous-Chef

    You'll need to use a self attribute for the bullet actor. Call it something like self.direction and make it an angle attribute. Make a boolean attribute called self.locked. When the player touches the screen, change self.direction to the angle the bullet should follow and then hange self.locked to true. Make the rule for changing self.direction have self.locked is false as a condition. That way once the bullet picks a direction, it doesn't change ever again. You'll need to use self.direction as the direction angle for the Move behavior or whichever behavior you're using to make the bullet move across the screen.

    Also, this subforum is for PAID requests. If this not a paid request, please let me know. Are you using Mac or Windows Creator? I can move it to the correct subforum for you.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.