• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Making a Tree Gate

Status
Not open for further replies.
Level 1
Joined
Sep 2, 2007
Messages
3
Hello,
I am wanting to have a tree blocking a pathway unless someone steps on a certain region
So I know I will have a region & a trigger to kill the tree and another trigger to resurect the tree after they enter region two

The question is this, How do I identify the tree?
I suppose it needs to be established as a entity or what ever it is called in warcraft, sorry I did halflife maps so thats what we called them there, I have seen the classification of <gen> on things, so im thinking thats what I need the tree to be so I can find it?
How do I do that?

Thanks
 
Level 10
Joined
Apr 3, 2006
Messages
535
there is a trigger, in the DooDad section that allows you to destroy selected doodad, eg tree. You may need to assign a variable to the tree to be able to identify it. Or could you not use a gate? and make it open.close when you need it to via triggers?
 
Level 14
Joined
Nov 4, 2006
Messages
1,240
i think every tree has a different number behind the name if you select it (eg tree 0137; tree 0138; etc) so you can identify them
then you need 2 triggers for open/close
i know 2 possibilities to do it:
1.way
open:
event:
unit enters "open region"
action:
kill tree 0136
kill tree 0137
kill tree 0138
(or whatever the name of your tree is)

close:
event:
unit enters "close region"
action:
revive tree 0136
revive tree 0137
revive tree 0138

2.way (for this one you need a region in which all affected trees are)
open:
event:
unit enters "open region"
action:
pick every destructable in "gate region" and do action: kill "picked destructable"

close:
event:
unit enters "close region"
action:
pick every destructable in "gate region" and do action: revive "picked destructable"
 
Level 10
Joined
Apr 3, 2006
Messages
535
each tree should have a unique doodad number. Use the doodad action trigger, and destroy/revive selected doodad, sorry im not near my copy of WC3 atm so i cant paste exact triggers
 
Level 11
Joined
Aug 25, 2006
Messages
971
Truly you don't need to establish something as an entity. You don't even need to make it a variable, why? Because everytime you create a destructable (like a tree) or a unit, it makes a variable for you. Thats what the gg_ is. Generated Global.
 
Status
Not open for further replies.
Top