Triggers On Load

This tutorial demonstrates how to have events triggered by the player reloading the game. This method can easily be used to count the number of times the player reloaded during the course of the mission, to have a message displayed every time the mission loads, or for something more complex.
Of course, seeing as any variable you could use as a reload counter will not be saved unless the player saves, you cannot use this method to count how many times the player reloads from a specific save; just how many times his or her session has been interupted.
This tutorial requires the use of a custom gamesys file. For more information, see: Using a custom gamesys.

First of all, find the EmitterTrap (-2555) archetype, and create a new archetype under it called 'ReloadEmitter'.

Give this new archetype the ReloadTweqEmit script (replace the TrapTweqEmit script and leave the Don't Inherit checkbox set to False)

Now, add Tweq->Emit and set it up as follows:

Halt:   Continue
AnimC:   Sim
MiscC:   [None]
CurveC:   [None]
Rate:   500
Max Frames:   1
Emit What:   broadhead
Velocity   0 0 0

Also add Tweq->EmitterState and set AnimS to 'On'

Create another archetype under ReloadEmitter and call it 'UselessEmitter'.
Add the Tweq->Emit property and remove the Sim flag from AnimC.

Now, create a blue room and a banner and a ReloadEmitter inside it, with the ReloadEmitter facing the banner from a distance of about 1 unit.

Select the banner, and add the following Act/React Receptron:

Stimulus Min Max Effect Target Agent Additional Data
PokeStim 0 [None] Set Property ReloadEmitter UselessEmitter Prop Name: CfgTweqEmit

Finally, add PokeStim receptrons to perform any actions that should be carried out each time the game reloads.

The reason this effect works is because the banner's PokeStim receptron changes the archetype of the ReloadEmitter in the gamesys, causing it to stop firing: as the gamesys is not saved in the saved game, it will be reset each time the player reloads.

Bear in mind that any effects bound to this reload trigger will also be triggered when the mission first starts.