wiki.sine.space | sinespace

Difference between revisions of "Traps"

From wiki.sine.space
Jump to: navigation, search
(Created page with "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 tr...")
 
Line 4: Line 4:
  
 
This video tutorial shows how to configure and publish your own Enemy NPCs and NPC Spawners as inventory items that players can in place in their multi-player maps in Sinespace;
 
This video tutorial shows how to configure and publish your own Enemy NPCs and NPC Spawners as inventory items that players can in place in their multi-player maps in Sinespace;
 +
 +
 
PENDING
 
PENDING
 +
  
 
'''Public variables'''
 
'''Public variables'''
Line 11: Line 14:
  
 
'''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.
 
'''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.
 +
 +
 +
 +
[[File:TrapsVariables.png|500px]]
 +
 +
  
 
'''Events'''
 
'''Events'''
Line 19: Line 28:
 
*damage  
 
*damage  
 
*kill
 
*kill
 +
 +
 +
[[File:TrapsEvents.png|500px]]
 +
  
 
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.
 
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.
Line 26: Line 39:
 
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.
 
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.
 
You do need to retain the proximity activator in the references field.
 +
 +
 +
[[File:TrapObjectRef.png|500px]]

Revision as of 04:52, 2 March 2019

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 Enemy NPCs and NPC Spawners as inventory items that players can in place in their multi-player maps in Sinespace;


PENDING


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.


TrapsVariables.png


Events

There are four events;

  • activateTrap
  • deactivateTrap
  • damage
  • kill


TrapsEvents.png


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.


TrapObjectRef.png