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

need help with gate

Status
Not open for further replies.
Level 2
Joined
Sep 9, 2005
Messages
18
probably already posted but w/e, i need help with openin a gate with a hero who steps on the region but needs the key, how would u make that trigger? ive made the key and blah, and tried different actions and events but i just cant get it, help?
 
Level 18
Joined
Mar 7, 2005
Messages
824
yeah its already posted here i can write it for u again:

If I understand correctly you want to make it so you can open and close doors by saying or using something and for it to also repair with a certain command. This was one of the first things I tried when I first started with triggers. You need to have a trigger for each function first of all. Now you can have theses trigger by typing in something, walking over a region or using an item. All them are pretty much the same atleast the actions. Anyways, I will show an example of open/close since they are almost identical.

Event:
Player - Chat Message(Type your message in, the player specified part can be fixed, you dont need to make an event for each of them)
Unit - Generic Unit Event - A unit Begins casting an ability(to use items you would use a spell to activate the trigger, this can be a dummy spell, so it has no effects) or
Unit - A Unit Enters Region(you'll need to create a region for this to work)

Conditions:(only for item)
Use an ability camparison to specify the spell on the item that is being used)

Actions:(easy part)
Destructible - Open/Close/Destroy Gate(pick which you like then find the gate you would like the trigger to effect)

Voila! That was easy. Now, there are things that can be changed, you can use variables to specify the user that is controlling the gates using another trigger. Close is exactly the same, pretty much you change the action. Now the repair is a little different, but not by much, like really, not by much. You can keep all of the above events and conditions(if you use the item/spell thing, you will need to make a new item) and if you do use it for the open/close i may need to explain some more on how to do that, since you will need to be turning off and on the close and open triggers.

Actions:
Destructible - Ressurect

You will have to make seperate triggers for each door, I am sure there is a way to specify it more so the use of one trigger is only needed, but i dont feel like explaining. Oh yes, if you want repair time to have a delay, then you can use the action "wait" before the ressurect so that, that action will not go into effect until the time is up.
[/quote]
 
Level 6
Joined
May 13, 2005
Messages
164
...Okay, im confused after looking at Tr!kzz's post. I am not sure whether this is what u want but i will post it anyways.

Event-
-Unit enters (region)

Condition-
-Triggering unit equal to a hero equal to true

Actions-
If (entering unit) has item type of item (key), then open (gate) else do show text message to (owner of entering unit) for 10 seconds (you need a key or wateva u wanna type here)
 
Level 2
Joined
Sep 9, 2005
Messages
18
umm yaahhh...i was also kinda confused at tr!kzz post also, i like LR way more, thats how i wanted it, ill try it now but then how do u keep the gate open forever and remove the key from the hero
 
Level 6
Joined
May 13, 2005
Messages
164
The gate will be foreva open if u dont close it :p

Anyways, sorry for not removing the key.
Its under item:

'Item- Remove item' its about something like that.

Actions-
If (entering unit) has item type of item (key)

then open (gate) and 'Item-remove item type of item (key) from (entering unit)

else do show text message to (owner of entering unit) for 10 seconds (you need a key or wateva u wanna type here)
 
Level 4
Joined
Jul 11, 2005
Messages
59
Ahaha, quoting me eh Tr!KzZ. Sorry if it was confusing, it was ment for some other type of thing. I can't even remember what the problem was that the guy had. I simply gave him different options as to which he could use for opening and closing doors. :?

EDIT: I tend to make things complicated. :lol:
 
Level 2
Joined
Sep 9, 2005
Messages
18
grrr, still cant get it

If (entering unit) has item type of item (key)

thats the part i cant find, which part is that under? units,items?
 
Level 4
Joined
Jul 11, 2005
Messages
59
BrownSTA said:
grrr, still cant get it

If (entering unit) has item type of item (key)

thats the part i cant find, which part is that under? units,items?

Do you mean the If/Then/Else action? Its not under a category, you just go to the drop down menu in all and scroll down a bit. :D
 
Status
Not open for further replies.
Top