Basically, when you make a zergling burrow, it toggles center view on/off. It's like a perfect center view on/off system, because you can never lose sight of your zergling to toggle center view on/off. I did the triggers for it, and it partially works. Like when you burrow the zergling it DOES center view, but when you try to toggle it OFF, you have to burrow the zergling like 7 more times. What did I do wrong? (Yes, I DID make the location that's centered on the zergling small enough. I also made a trigger that sets "P1 Burrow" to clear.)
Triggers (StarForge format) Below:
Trigger 1
Conditions
Always();
Actions
MoveUnit(1, Probe, P1, Detect Ling1, Burrow1);
PreserveTrigger();
Trigger 2
Conditions
Bring(P1, Exactly, 1, Zergling, Burrow1);
Bring(P1, Exactly, 1, Probe, Burrow1);
Actions
SetDeaths(P1, SetTo, 1, Burrowed?);
Order(Zergling, P1, Burrow1, Move, Burrow1);
PreserveTrigger();
Trigger 3
Conditions
Bring(P1, Exactly, 1, Zergling, Burrow1);
Bring(P1, Exactly, 0, Probe, Burrow1);
Actions
SetDeaths(P1, SetTo, 0, Burrowed?);
PreserveTrigger();
Then, there's a switch named "P1 Burrow" and when it's SET, it means center view. When it's CLEARED, it means DON'T center view. Okay last main trigger:
Trigger 4
Conditions
Deaths(P1, Exactly, 1, Burrowed?);
Actions
SetSwitch(P1 Burrow, Toggle);
SetDeaths(P1, SetTo, 0, Burrowed?);
PreserveTrigger();
That's all of the triggers affecting the centerview on/off system.
I don't really see anything too weird in the triggers, but I don't like how it says to "always" do move the probe. Wouldn't it be better to check after you've made sure that you've moved it?
..Trigger... (The Moving of the Probe)
Condition
While something is false(clear, 0, etc)
Action
Make the something true (set, 1, etc)
..Trigger.. (The Checking of Burrow)
Condition
While that thing is true
Other conditions to verfiy if the probe is on the location or not
Action
If the probe is there, toogle
else, make condition false, remove the probe
Well, I tried it, and it didn't really work

. I don't really see the difference though on changing 'Always' because...if I do always the probe WILL get moved to the zergling's location regardless of whether or not it's burrowed.
i know this is happening. what is happening is that the trigger form is exactly right. the problem is that its firing about 3-4 times. when it does that it continuously toggles the switch so sometimes it may stay set. to fix this, make a 1x2 square tile place. teleport the zergling to a 1x1size location on the left side of the 1x2 square tile while the zergling is stilll burrowed. then order it to move to another 1x1 size location 1 grid sqaure to the right. then make a location that when he brings a zergling to that location, it moves it back to the original spot it was burrowed at.
Ohh.....hmm I guess I never thought of the trigger firing 1-4 times over again

. The problem is, I can't move the burrowed zergling to a different spot because then the player controlling the zergling would have an advantage by being able to 'dodge' enemy units for a brief amount of time. One more question....but HOW could the trigger fire more than once IF it sets the deaths of 'Burrowed?' to ZERO AFTER toggling the switch? The zergling WOULD be unburrowed already, so...what else would cause it to fire?
well your using hyper triggers i presume. it takes the zergling about a second to unburrow so the trigger could fire numerous times during that period. here's a map to show how to do it and it also wouldnt be that much of an advantage.
[attachmentid=4420]
ill reply to this topic tomorrow if you dont understand it again.
Try this:
Trigger 1
Conditions
Deaths(P1,Exactly,0,Burrowed?);
Actions
MoveUnit(1, Probe, P1, Detect Ling1, Burrow1);
PreserveTrigger();
Trigger 2
Conditions
Bring(P1, Exactly, 1, Zergling, Burrow1);
Bring(P1, Exactly, 1, Probe, Burrow1);
Deaths(P1,Exactly,0,Burrowed?);
Actions
SetDeaths(P1, SetTo, #, Burrowed?);
Order(Zergling, P1, Burrow1, Move, Burrow1);
PreserveTrigger();
# = 12 if hyper, 3 if not
Trigger 3
Conditions
Deaths(P1, AtLeast, 1, Burrowed?);
Actions
SetSwitch(P1 Burrow, Toggle);
SetDeaths(P1, Subtract, 1, Burrowed?);
PreserveTrigger();
Trigger 4
Conditions
Deaths(P1,AtLeast,1,Burrowed?);
Actions
SetDeaths(P1,Subtract,1,Burrowed?);
PreserveTrigger();
QUOTE(greenreaper @ Jan 24 2005, 08:04 PM)
One more question....but HOW could the trigger fire more than once IF it sets the deaths of ... (trimmed)
[right][snapback]131767[/snapback][/right]
If the next player ran his triggers and Trigger 2 was still true it would set the deaths back to 1. He never mentions anything about moving the probe back, i find that odd. Also trigger 3 is pointless.
But the trigger isn't firing more than once, If it was it would most likely be doing that because it was owned by several players. If that was the case it would do the same thing every time, so it would ither work compleatly or not at all. Not work one second then not the next. If it was an effect of extra waits some where it would be the very same, but like you said with the set deaths that makes the chances of that really small and depenedant on where his actualy center view triggers are.
I think the problem is in trigger order and possably involving the unmentioned moving back of the probe or the useless trigger 3. Without seeing the map its impossable to tell, besides i hate reading triggers in SF's syntax.
Whoops, I forgot to put that trigger in. It's just basically 'Always' move 'probe' at 'anywhere' to 'detect ling'. All the triggers I posted were for Player 1 only, and lastly, there were no extra waits. Hmm....I'm just about to try Chu's method...