Randomly generating doodads?

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
Hi, I want my map to generate trees on dry land to fill a certain region, is that possible? Something like generate X trees at random points in region. Reason is to create a map that is different each time you play it.
 
Well it is possible to generate random destructables, like trees and such, placing doodads with triggers is impossible -as an alternative you could always use Special effects in stead and change the pathing of that spot with triggers.

You can also do the same with tiles

Though you can use terrain deformations I'd advise you not to - units in Wc3 ignore changes in the terrain due to triggers for some odd reason and you can't get the height of that region via GetLocZ either.
 
Level 6
Joined
Mar 22, 2009
Messages
276
There is a "Doodad - Create X destructable/tree at YOURLOCATION" action check it on GUI.
You may use that. It is like creating unit at random location.
 
Level 9
Joined
Aug 21, 2008
Messages
533
You may use units with the lucost abilty for doodads. Actually there is no visual difference beetwen a doodad and a unit with locust ingame.
Make sure to also cheke them as "tauren" "giant" or waht ever, to have something to filter them out in triggers.


(if a trigger damages all unit in 600 aoe, you just have to at a contition that taurens/giant/... are ignored)
 
You may use units with the lucost abilty for doodads. Actually there is no visual difference beetwen a doodad and a unit with locust ingame.
Make sure to also cheke them as "tauren" "giant" or waht ever, to have something to filter them out in triggers.


(if a trigger damages all unit in 600 aoe, you just have to at a contition that taurens/giant/... are ignored)

i usually do this

If GetUnitAbilityLevel(u, 'aloc') == 0 then
// actions
Endif

or
JASS:
 function Conditions takes nothing returns boolean
return (conditions) and GetUnitAbilityLevel(GetFilterUnit(), 'aloc') == 0
 
You kiddin? It works with trees too.
The thread starter want to create trees in random location that's why i gave him that

Son, I am disappoint

Trees are destructables. Doodads are entirely different. Destructables are things like rocks and trees, which as their name implies, can be destroyed - they have HP. Doodads are things like fire, lamp posts or other assorted things which do not have HP and can't be interacted with normally in game.
 
i usually do this

If GetUnitAbilityLevel(u, 'aloc') == 0 then
// actions
Endif

or
JASS:
 function Conditions takes nothing returns boolean
return (conditions) and GetUnitAbilityLevel(GetFilterUnit(), 'aloc') == 0

which does not really matter since most unitgroup functions don't enumerate locusted units anyway

Son, I am disappoint

Trees are destructables. Doodads are entirely different. Destructables are things like rocks and trees, which as their name implies, can be destroyed - they have HP. Doodads are things like fire, lamp posts or other assorted things which do not have HP and can't be interacted with normally in game.

afaik you can disable destructables being clickable ingame and I am sure that it is possible to make them invulnerable so the difference should not be too big
however one would have to create masses stuff to get the same effect
in my opinion the idea with special effects and pathing manipulation sounds very well
it might be a good idea to run the random-terrain-trigger at map ini because else pathing stuff will be fucked up
 
Status
Not open for further replies.
Top