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

[General] How do I randomly generate multiple destructibles in a map? Gui

Status
Not open for further replies.
Level 3
Joined
Nov 24, 2009
Messages
29
I want to generate rock chunks in random positions in my map. Enough to fill up around 95% of the map space. I can so far only use GUI
 
Level 3
Joined
Jan 8, 2011
Messages
70
Here is a very simple way, that requires some tuning by yourself to suit your needs.

  • Create Rock
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Destructible - Create a Rock Chunks at (Random point in (Playable map area)) facing (Random angle) with scale 1.00 and variation 0
  • Cancel Rocks
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn off Cancel Rocks <gen>
The first trigger is creating rocks at random places in your map (playable map area) every 0.05 seconds, which i used as an example, so you can change that to make the rock spawn on your map instantaneous or take time.

The second trigger simply turns off the 'create rock' trigger after a certain amount of time. You will have to adjust the elapsed game time when it turns off the trigger to ensure that there is sufficient rocks on the map for you.

This is a very simple way of doing it and as such is not very efficient but it is also a very easy way so you have no issues.
 
Status
Not open for further replies.
Top