Traps can be anything in the scene that damages the player. The default template in the sample art package is a fire trap that players can place anywhere in their maps. The trap system could also be used to create a wide range of other hazards, for instance bombs, or a roving laser cannon as shown in the tutorial video.
The public variables on the trap component include settings for damage amount and damage rate.
This video tutorial shows how to configure and publish your own traps as inventory items that players can in place in their multi-player maps in Sinespace;
Public variables
The trap has two public variables;
trapDamage and trapInterval. These define the amount of damage the player will take and how often for as long as the damage trigger is activated, in the case of the default art, by a trigger activator.
Events
There are four events;
These events allow you to add whatever cosmetic or animated events you want to the trap. In the sample art the activate and deactivate trap events swap between large and small flames, with the flames increasing as you come close to the damage collider.
References
There is one object reference; the proximity activator. This switches the trap on; not to do damage but to listen for the player. In the sample art this switches on when you get near the damage collider and the particles swap from small to large flames on activation. You do need to retain the proximity activator in the references field.
|