Spawning different weapons

butterbeanbutterbean Member Posts: 4,315
edited November -1 in Working with GS (Mac)
I"m working on a shooter now, and was wondering, what's the easiest way, when a player runs into a different weapon upgrade, to spawn a different bullet?

If the player is set up to originally spawn "Bullet 1" and they run into say "machine gun" how do you change what the player spawns?

Comments

  • EastboundEastbound Member, BASIC Posts: 1,074
    Just use a global integer named weapon, then when a player runs into whichever power up, you set weapon equal to that integer.

    Then in the player actor when he is shooting say:
    If weapon = 0
    Shoot normal

    If weapon = 1
    Machine Gun

    If weapon = 2
    Rockets

    etc.
  • butterbeanbutterbean Member Posts: 4,315
    Thanks! :)
Sign In or Register to comment.