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

[Trigger] [B]destoying a bunch of trees in one region[/B]

Status
Not open for further replies.
Level 4
Joined
Jul 12, 2008
Messages
53
i don't get how to destroy or create...etc. a bunch of destructible in one area using tiggers, all i get is nothing happening.................. anyone help??
 
Level 4
Joined
Jul 24, 2008
Messages
108
  • create trees
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set regionvar = (Random point in No region)
          • Destructible - Create a Summer Tree Wall at regionvar facing (Random angle) with scale (Random real number between 0.80 and 1.20) and variation (Random integer number between 0 and 2)
          • Custom script: call RemoveLocation (udg_regionvar)
Just edit the regions

regionvar is actually a point variable, for removing them, set a variable to a location, then pick every doodad in that variable and kill, then custom script call RemoveLocation (udg_varname)
 
Level 4
Joined
Jul 24, 2008
Messages
108
You are going to want to do a pick every destructable in group (destructables in region) and kill picked unit. Dont got we with me now but its something like that
 
Level 7
Joined
Jul 12, 2008
Messages
295
Add this in actions of your trigger.. Destructible - Pick every destuctible within X range of (position of (casting unit)) and do Actions
Loop Actions: Kill Picked destructible. Sorry i can't do this with pictures(triggers) because i don't know how :S
 
Level 4
Joined
Jul 24, 2008
Messages
108
everything you do and make in wc3 takes up memory, picking all units in a region, that stores all those units into memory under a variable, when you kill them, that variable still exists with those units stored in it. Even though you are never going to use that again its still taking up the memory. It may not be much, but repeat this several hundred times, and you run out of memory and start to lag/desync. This is what i understand memory leaks to be.
 
Status
Not open for further replies.
Top