Staredit Network

Staredit Network -> StarCraft Editing Related -> Check or Act?
Report, edit, etc...Posted by Endarire on 2005-03-15 at 23:39:56
Which causes less CPU strain?
Trigger
Players:
¤ Player 1
Conditions:
¤ Always
Actions:
¤ Modify Unit Hit Points: Set to 100% for men at Heal Zone.
¤ Preserve Trigger.

Trigger
Players:
¤ Player 1
Conditions:
¤ Player 1 brings at least 1 men to Heal Zone.
Actions:
¤ Modify Unit Hit Points: Set to 100% for men at Heal Zone.
¤ Preserve Trigger.
-EE
Report, edit, etc...Posted by Nozomu on 2005-03-16 at 00:08:37
Unless you're running StarCraft on a 486 or something there should be no noticable difference. But technically the first one takes up more memory, based on the average time spent playing the map.
Report, edit, etc...Posted by D_Scypher on 2005-03-16 at 01:56:04
The second would take less processing since it's conditional and not constant, but yeah -- it's not like there will be much of a difference. I guess you could also boil it down to the fact that the second trigger would have to be applied for Current Player and be checkmarked for the whole player Force or something. There are tiny differences among them, if that matters at all.
Report, edit, etc...Posted by chuiu on 2005-03-16 at 16:51:34
Since starcraft checks every trigger one by one, it would only take 1 more step when doing the always. Considering the requirement for that, it would take thousands (or even a multiple of that) of triggers running on always to create lag from doing nothing.

However, it is usually better to use conditions that actually check before they act because you then have more control over them.
Next Page (1)