Staredit Network

Staredit Network -> UMS Assistance -> UNally help
Report, edit, etc...Posted by r[s]t on 2005-08-31 at 21:45:25
Always();
Deaths(P8, Exactly, 0, 1);

SetAllianceStatus(P1, Ally);
Comment("ally");

-
Deaths(P8, AtLeast, 1, 1);

SetAllianceStatus(P1, Enemy);
SetInvincibility(Disable, Hero, CurrentPlayer, city);
SetInvincibility(Disable, -=HERO=-, CurrentPlayer, city);
Comment("enemy");
PreserveTrigger();

-
Deaths(P8, AtLeast, 1, 1);

SetDeaths(P8, Subtract, 1, 1);
Comment("subtract");
PreserveTrigger();

-


SO when i want p8 to unally p1 for 2 seconds i just set the deaths of 1 to 2. Right? Why wont it work?
Report, edit, etc...Posted by Kumano on 2005-08-31 at 22:12:28
You didn't use a preserve trigger on the ally trigger.
Report, edit, etc...Posted by Wing-of-no-Wing on 2005-08-31 at 23:27:44
It doesn't work because as soon as the unally trigger is done, the next one activates, setting the deaths back to 0, letting the re-ally trigger execute.

Either put in a wait somewhere, or (more recommended) put in a physical timer. I personally am a fan of timing things using a running unit, but it'd probably easier to just use a dying terran building of known burn-down time to control it. The first trigger would reset the deaths of 1 back to 0, create a dying building, and set a switch, in that order, and also unally the player. Then the next trigger should be that if the switch is set but no building is detected, clear the switch and re-ally the player. So the whole thing could be done in two triggers instead of three.

Oh and, the Always condition is unnecessary whenever you are using other conditions. Conditions are always processed as AND: if ALL of them are true, then the trigger executes. An ALWAYS trigger is simply a perpetual TRUE, so it only makes a difference if it's the only condition. Similarly a NEVER trigger is a perpetual FALSE and stops the trigger, but that's another story...
Report, edit, etc...Posted by PCFredZ on 2005-08-31 at 23:29:03
You also didn't set deaths for unit "1" to 1 anywhere.
Report, edit, etc...Posted by r[s]t on 2005-09-01 at 13:25:23
fred, that set thing is in antoher trigger.
Report, edit, etc...Posted by Kumano on 2005-09-01 at 13:31:27
Okay, what is the problem? You say it doesn't work, does it stay unallied or does it not unally at all? Need details...
Report, edit, etc...Posted by Urmom(U) on 2005-09-01 at 14:53:11
if you have hyper triggers try setting it to 24 or something and so then(if it adds and subtracts deaths in the same amount of time) itll be two seconds insteal of 1/12 of a second
Report, edit, etc...Posted by PCFredZ on 2005-09-01 at 19:31:31
Alright, attach the map.
Next Page (1)