• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Filling map with doodads

Status
Not open for further replies.
Level 2
Joined
Aug 27, 2012
Messages
18
Hi. I use this trigger to fill map with blocks:

  • Trigger
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • For Each (Integer B) from 0 to 78. do (Actions)
        • Loop - Actions
          • For Each (Integer A) from 0 to 78. do (Actions)
            • Loop - Actions
              • Set Random100 = (Random integer number between 1 and 100)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Random100 Greater than 20
                • Then - Actions
                  • Set StartX = ((Min X of (Playable map area)) + 384.00)
                  • Set StartY = ((Min Y of (Playable map area)) + 384.00)
                  • Set Temp_Point = (Point((StartX + ((Real((Integer A))) x 128.00)), (StartY + ((Real((Integer B))) x 128.00))))
                  • Destructible - Create a Stone at Temp_Point facing 0.00 with scale 1.70 and variation 0
                  • Custom Script: call RemoveLocation (udg_Temp_Point)
                • Else - Actions
It fills only half of my map! Why?
I want to create less than 79*79=6241 destructibles. It should fill almost entire map!

I use NewGen.
 
And where's the screenshot showing how your map is after this being done? If it doesn't fill the whole map, probably the random integer isn't allowing it.
 
Thanks, adding 0sec TriggerSleepAction solved my problem! It takes a few seconds to generate, but it's OK.
 
Status
Not open for further replies.
Back
Top