I made lever something like this (cant copy GUI coz no WE on this comp...)
When lever dies, gates will open.
But i want lever wich can open and close door.
How about something like this. You have a real variable that's default is 0 (It is named Lever_Set in the triggers below). Make the lever have 999999 life (Not invulnerable, you want it to be attackable) and 99999 life regen. Then set a trigger such that:
Trigger:
Lever gets attacked
Events
Unit - A unit is attacked
Conditions
Unit - Unit-type of (Triggering unit) Equal to Lever
Actions
If (multiple conditions) then (then actions) else (else actions)
If - conditions
Lever_Set = 0
then - actions
Set Lever_Set = 1
else - actions
If (multiple conditions) then (then actions) else (else actions)
If - conditions
Lever_Set = 1
then - actions
Set Lever_Set = 0
else - actions
...and then make two more triggers with the events:
Game - Lever_Set becomes equal to 1
...for this trigger (above)^ make it open the gate in the actions.
Game - Lever_Set becomes equal to 0
...for this trigger (above)^ make it close the gate in the actions.
Why? In your WC3 tags here you used Integer. The only difference between the two is that reals can be 0.01, 0.02 ect and Integers can not. If he really wanted to, he could use a boolean for the same affect.
Crofna, for each door you will probably need a new variable. Also make sure that the condition checks for the right lever and the actions open the right door.
@Joccaren: We all make mistakes lol. I didn't see that either.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.