I just wanna be shot at!

allaboutiweballaboutiweb Member Posts: 42
edited November -1 in Working with GS (Mac)
I have an actor moving about the screen. When it collides with an invisible actor (a large square acting like a speed trap/radar thingy) an alarm sounds in the car and a light flashes on the dash saying that radar has been detected.

What I would like to do is now have a 3rd actor fire something at the 1st actor after say 3 seconds of the 1st actor colliding with the invisible (2nd) actor.

I thought I had found the solution here: http://gamesalad.com/forums/topic.php?id=8414#post-58058 but it doesn't work for me. It is soooo annoying, there isn't much left to do on the game after this, apart from add the proper images and they are being done now......sooo close......

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Whatever the target is that you are shooting at needs this:

    1) Create game attributes (integer or real) game.playerX and game.playerY
    2) IN the target actor constrain game.playerX to self.position.X and game.playerY to self.position.Y

    Now you can use these attribute in a number of ways.

    You could put a change velocity behavior in a bullet actor and use VectorToAngle(game.playerX-self.positionX,game.playerY-self.positionY) as the angle. Or you could try moveTo and use those attributes, or accelerate towards, etc.
  • quantumsheepquantumsheep Member Posts: 8,188
    /lines up gunsight

    Just say when!

    QS :D
  • allaboutiweballaboutiweb Member Posts: 42
    quantumsheep said:
    /lines up gunsight

    Just say when!

    Not just yet....thanks....I'll get my game finished first....but thanks for the offer....
Sign In or Register to comment.