• 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.

How do i create a trigger witch spawns a item in a random region?

Status
Not open for further replies.
Level 16
Joined
Oct 12, 2008
Messages
1,570
Question:
Do you want to create in a RANDOM POINT?
Or in a RANDOM REGION?
If you want a random region:
  • Set Region[1] = Your Region 1 <gen>
  • Set Region[2] = Your Region 2 <gen>
  • Set Region[3] = Your Region 3 <gen>
  • Set TempLoc = (Center of (Region[Random number between 1 and 3]))
  • Item - Create 1 Item at Temploc
  • Custom script: call RemoveLocation(udg_TempLoc)
In this one, 'Region' is a Region variable with an array =)
TempLoc is a Point variable withOUT array =)

Or if you want random point in region:
  • Set TempLoc = (Random Point in (Playable Map Area))
  • Item - Create 1 Item at Temploc
  • Custom script: call RemoveLocation(udg_TempLoc)
Here also, TempLoc is a Point Variable withOUT array =)
 
Status
Not open for further replies.
Top