Author Topic: SGSK - Enemy ship gun shooting  (Read 3168 times)

lagerzero

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
SGSK - Enemy ship gun shooting
« on: March 14, 2014, 01:21:34 PM »
Anyone know of a script to make the enemy ship shoot when the ship get close to your Player ship.

I already made a script for the ship to start chasing you when you pass close to it but I'm looking for another behavior to make him shoot.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: SGSK - Enemy ship gun shooting
« Reply #1 on: March 14, 2014, 01:32:09 PM »
Firing of weapons happens in the SpaceshipController class, inside the Update() function. SpaceshipController simply calls the "Fire" method on the chosen weapon. All weapons have it.

jannugimes

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: SGSK - Enemy ship gun shooting
« Reply #2 on: April 24, 2014, 11:08:33 AM »
I had wanting to know this too