together here. these apply to ts and ra2
Set Local and Clear Local
an under utilized but powerful function in the unit script action roster is 'set local' and 'clear local'. through this function one can make teams execute
the firing of a trigger via trigger event 'local is set / local is clear'. ill mention a few ways to use this now.
Complex script execution.
by using the script action set local in conjunction with a trigger with event local set, and action 4 create team, you can make units 'jump' teams
so to speak. one good example of this is loading units on an air transport

the team 10 e1 move to the chopper execute script action firing a trigger which recruits the team 10 e1 + 1 chopper which executes the
script to load and then leave the map.

a TRUCKA moves to the building firing a trigger which spawns 2 CTECH via action 80, the ctech move to the TRUCKA firing a trigger creating
a team 2 CTECH + 1 TRUCKA, that team then loads onto transports, 'loads cargo' and leaves the map deleting itself. before it deletes itself
it fires a trigger creating the next TRUCKA.

the ai builds a team 3 E2 via ai trigger which move to the train firing a trigger making the team 3 e2+train which moves to a different
place unloading and dividing teams firing a trigger to recruit the 3 e2 into a team that leaves the map, the train returns to start and it repeats.
i think ive made the concept of multi-scripting clear, ill talk about another way to use this; but first know that war factories and
vehicles are hard coded to produce vehicles belonging to the house of the factory from the house's factory. put simply: if you change
the Owner= entry to be the same on both, and exclusive to that factory (IE using 'neutral' or a custom singleplayer house) it forces
that specific vehicle from a specific war factory.
building off of this, if you make an invisible war factory by ini editing some random other building, and an invisible (by using invisibleingame=yes
and not image=none) vehicle dummy, you can make invisible units appear at a set spot after the player 'builds them'
okay. and building off of this, you can set celltags on the war factory with a repeating
trigger with event 'entered by' and action 4 'make team'. making a team consisting of the invisible dummy unit, executing a script to set some local
and then self terminate.
NOW you can set any trigger, especially repeating self clearing triggers, to have the event of that local being set. NOW, you can quite literally
buy the firing of a trigger. i wont even get into all this entails, but a super super simple example is making a reinforce @ waypoint action

How To Make Blinking Light Posts
i also want to mention briefly how to make blinking light posts, since that was one thing no one apparently knew how
to do as i searched for a way. its simply a matter of placing two triggers on 1 object.

create 2 repeating triggers with events 13 elapsed time, one with integer 4 or something and another with 5 so they are desynchronized.
and have one with action 'turn building on', the other with action 'turn building off'. now attach the second trigger to the first via trigger editor,
and delete the tag for the second via tag editor. now both fire through one tag which you attach to the building.
like local variables, multitriggering is a powerful and widely unused mapping feature.
Tips With Particles Systems
lastly ill quickly mention you can ini edit particle systems to play anims such as this

by making a particle system that behaves like smoke, and having the particle take the image of the anim. using the key
'velocity=' to adjust the vertical offset of the anims, and 'windeffect=' to adjust the horizontal offset. one can either time it
with a looping trigger with action 88, or have a long integer on the SpawnCutoff= under the particlesys; and these anims can
be cleanly packed within the map file (may want to overwrite unused particlesys for multiplayer games)