Appendice

Global variables

This section is created for fast reference to available external procedures and global variables. However the second term wasn't explained yet. Once you read Tier 3 you should be familiar with variables. They act exactly like variables expect one thing: There are only 5 global registers given to the object. They are indexed from 0 to 4. There is an exception but read Cheats section in that case. The global registers have special meaning and cannot be used as temporary variables. To access them call either: For now I know very few of them but they aren't used especially often in the BUILD.EMC.

Reference for external routines

Below you will find all the info that is needed to use them ie. arguments and the return code, how they work and where to use them.
Delay()
Reveal()
Explode()
Destroy()
Text()
PlaySfx()
SetFrame()
GetFrame()
RefineSpice()
GetTarget()
GetAngle()
SetAngle()
ShootTarget()
Attach()
Disattach()
Deploy()
VerifyAtch()
The best method to get to know how to use these procedures is to check the original script. For example to get units back on battlefield from Repair Facility without need to surround the structure you can copy part of script from refinery (Harvesters are always picked-up first). The main issue is to replace Deploy() and Attach() call order.

Cheats

Yes. EMC has some features that are illegal to use, but very powerful. Note that it's risky to use them because it will affect private data that are used elsewhere within the game. All cheats are based on fact that the place when global registers are stored is located close to other data related to the object and the register position is obtained on offset. So you can give some special values to Push/PopReg in order to access them. They are: