• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Item Re/Spawn

Status
Not open for further replies.
Level 2
Joined
Jun 3, 2009
Messages
19
Need some help with getting a trigger.
I can get a random power-up to spawn every thirty seconds at one of two places. Where im stumped is a new one cant spawn if the old one still is on the map in one of those two places.

Tried all sorts of triggers but they all fell short.
So any help appreciated! Thank you.
 
Level 8
Joined
Aug 21, 2009
Messages
333
Need some help with getting a trigger.
I can get a random power-up to spawn every thirty seconds at one of two places. Where im stumped is a new one cant spawn if the old one still is on the map in one of those two places.

Tried all sorts of triggers but they all fell short.
So any help appreciated! Thank you.

Create an variable that is a Point Array of size 2.
Let's call it "power_up_locs"
Set power_up_locs[0] to the first power up spawn location
Set power_up_locs[1] to the second power up spawn location

Create another variable that is a Item-Type Array of size X (X is however many power ups you've created)
Let's call it "power_up_types"
Set power_up_types[0] to the first power up type
Set power_up_types[1] to the second power up type
etc, etc...

  • spawn powerups
    • Events -
      • Periodic Event - Every 30 seconds of game time
    • Conditions -
    • Actions -
      • Item - Create 1 power_up_types[Random Integer between (0 and X-1)] at power_up_locs[Random Integer between (0 and 1)]
and that's all there is too it. if you have any more questions, do not hesitate to ask.
 
Status
Not open for further replies.
Top