• 🏆 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!

[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