Mapmaking tips by Dabbu

From Staredit Network Wiki
Revision as of 23:29, 20 March 2015 by DevliN (Talk | contribs) (1 revision imported: Restoring SC1 backup)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Map Making Tips by Dabbu

By Dabbu, 2004-10-26 @ 01:00:00

The Execution Order If you make triggers that rely on eachother's order to work properly then keep this in mind. The game executes triggers in order from top to bottom just like code. It starts at Player 1 and goes to Player 8.

However It's important to remember that 'All Players' and the 'Forces' don't work quite like that. Although those appear after player 8 in the list, the triggers inside them get distributed to the appropriate players and they don't append at the bottom (which would be nice) instead they mix based on some overall order.

Example 1: If I make in P1 a trigger, lets call it Dabbu, and then I make another, call it Czaries, then in the game Dabbu will execute before Czaries.

Example 2: If I make for P1 a trigger (Dabbu) then for All Players a trigger (Czaries) then for P1 again a trigger (Lancer) The executing order is Dabbu, Czaries, Lancer, Czaries x 7 (if P2-8 are active) If you put Czaries in P1 you will notice it go between Dabbu and Lancer because that's the order it was created in, and that's basically what will happen to it when you start the map. If you put Dabbu for P8 (and Player 8 is active) then Dabbu will execute last.

Tip: To make sure your triggers are in correct order move them temporarily in the same owner and set their order with the Up Down buttons, that's the easiest way to control their execution order. Using 'All Players' and 'Forces' is an easy and dynamic way to group tiggers for players, but it can have its toll, so just be careful.


Trigger Registration Some actions won't update key values which other condition may rely on, resulting in a false reflection of what is actually happening. Example 1: Trigger- always creates 1 zergling for Player X Trigger- Player X COMMANDS 1 zergling, give Player X 100 vespene Trigger- always removes all zergling for PX Player X will NOT get 100 vespene because what the player commands doesn't get updated as you make changes with the triggers, it gets updated NEXT time around. If it's crucial that a trigger knows when there truely is a unit or not and you may have changed that with a previous trigger during the tact then you should avoid the Commands condition, try to use Brings.

Example 2: Trigger- always, create 1 zergling for Player X Trigger- Player X BRINGS 1 zergling to Anywhere, give Player X 100 vespene Trigger- always, remove all zergling for PX Player X WILL get 100 vespene because what 'Brings' checks is updated even in the trigger tact.

Also: Create/Remove/Transport will update right away on the map, Kill will not. If I have one trigger Kill a unit and then another run if that unit is still around then it WILL run. Game Time / Real Time: These differ due to game speed. Game time (affected by the game's speed) - The count down timer - Elapsed Scenario time Real Time - The time we see when we review scores at the end of the game - Waits in triggers Note (rough example): In a trigger's actions [Wait 1, Wait 1] is NOT = Wait 2, more like 84. The fastest SC will resume trigger execution after an *individual* wait is no less than 42 milliseconds (that's with Hyper Triggers and Fastest game speed). This means any wait you use is technically rounded UP to a multiple of 42 (aprox).


Current Player You can save MUCH time by doing things dynamically. If there are 25 common triggers you need for 6 players you can either make them individually for each player (125 triggers total) or just make each of the 25 triggers work for all the appropriate players by using 'Current Player'! Also if later you want to change something you will only have to change it in one place, not 6!

A Common Mistake (related to above) The trigger makes 4 marines but you only wanted 1... Problem is you have the trigger in a Force with 4 active players under it and the trigger creates 1 marine for player X. The trigger will run 4 times (for those players) and create 4 marines for player X. Either stick the trigger for just player X, or make the conditions do things for 'Current Player', then it will make 1 marine for players w, x, y, z. Basically only make triggers in the Forces/All Players when you need them to do COMMON things for those players and use 'Current Player' in the action/conditions accordingly. Have fun Dabbu

(Copied from Old Old Wiki; Original Article - http://doodle77.dyndns.org/tutorials.php?id=4)