monster shooting when player is close

nowherejaynowherejay Member, PRO Posts: 85
edited March 2012 in Working with GS (Mac)
Hello! long time no see forums!
ive got time again to work on gamesalad im trying to pick up where i left off....

well ive got some enemies that i want to shoot at the hero. for example, i have a bat that id like to drop projectiles on the hero when he is directly underneath the bat. also im trying to get my walking monster to shoot at the hero when he is on the same platform as the monster and relatively close by. how would i accomplish this? i think a magnitude behavior?

please help! and thank you for the help!

Best Answers

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    Accepted Answer


    This should get you started
  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    edited March 2012 Accepted Answer
    No problem, and yep when distance is < whatever, spawn bullet or whatever you want to do

    cheers

Answers

  • nowherejaynowherejay Member, PRO Posts: 85
    ahhh thankyou! so you can use a magnitude function to find the distance, then use a rule that says *when player is 100 pixels away* shoot fireball. it should work that way right?
  • nowherejaynowherejay Member, PRO Posts: 85
    thank you!
Sign In or Register to comment.