How do i make Non-homing bullets?

QorrelQorrel Member Posts: 22
edited November -1 in Working with GS (Mac)
Hi.
I saw a tutorial on this quite sometime ago, yet i find it any more. Im trying to make a way so that when i press on the screen a bullet spawns at the player and then goes in a straight line to where he pressed. The only way i know how to do it means when ever i pressed somewhere else that bullet would change direction. Oh, im also trying to do it with Touch 3, incase that is significant.

-Qorrel.

Comments

  • dmilinovichiiidmilinovichiii Member Posts: 620
    Rule when touch three is pressed, for 0.01 seconds, accelerate to touch at 5000. That is the only way I can think of.
  • QorrelQorrel Member Posts: 22
    Mr.Rinoy said:
    Rule when touch three is pressed, for 0.01 seconds, accelerate to touch at 5000. That is the only way I can think of.

    Okai, i'll use this method. I'll just add a rule to delete the bullet once it stopped ;)
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Use Change Velocity instead of a timer and accelerate.

    Edit: The above is if it is heading towards that direction and continues on in that direction.

    If you want it to stop and destroy when it gets to that point, give the bullet real type actor attributes to contain the target point(X,Y). Then interpolate its position attributes to those target points.

    Then if its position matches its target destination( rule conditions) then destroy the actor.
  • dmilinovichiiidmilinovichiii Member Posts: 620
    CodeMonkey said:
    Use Change Velocity instead of a timer and accelerate.

    Wow! I can't believe I forgot that.
Sign In or Register to comment.