• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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