Actor Help. Firing Mechanism

fadelakinfadelakin Member Posts: 13
edited November -1 in Working with GS (Mac)
I'm working on a shooter and I want the missiles to fire when the user touches the button. So basically you touch to move the ship around but I want it so when the user touches the button, the ship will fire a missile. Anyone know how?

Comments

  • icanmakeicanmake Member Posts: 466
    make a boolean attribute called shoot.
    on the button make a rule that says, when touch is pressed, change attribut "shoot" to true

    then on the ship actor, make a rule that says when attribut "shoot" is true, spawn actor "missile"

    then in the missile actor make an accelerate behavior.

    hope this helps
  • fadelakinfadelakin Member Posts: 13
    OMG thank you. it works but it only fires once. Any idea to make it fire all the time when the button is pressed?
  • fadelakinfadelakin Member Posts: 13
    Also it only fires to the left. I want it to go up
  • fadelakinfadelakin Member Posts: 13
    I did. I set the direction to 90 degrees so it could go up but it still went to the left
  • fadelakinfadelakin Member Posts: 13
    It works now. thanks. just gotta figure out how to make it not fire only one. when i hit the button, it fires but when i hit it again, it does nothing.
  • fadelakinfadelakin Member Posts: 13
    Thank you. It works now.
Sign In or Register to comment.