Traps, Buttons, and Logic Gates - nZombies-Time/nZombies-Rezzurrection GitHub Wiki
HEAVY WIP
This article is about buttons and traps. How they interact with each other and how to configure them. ** SOME INFO MAY NOT BE RELEVANT ANYMORE**
Activatable Base
The Activatable base class is the interface subclassed by buttons and traps. An Activatable is an entity that can be used by the player (preesiing E on it) and will be activated if the player has enough points and electricity is on (optional).
You can edit activatable entities by using the contexttmenu (C-Menu) and rightclicking on the entity->edit properties...
Variables:
Variable Name | Type | Description |
---|---|---|
NZName | String | The name of the activatable, doesn't have to be unique |
ElectricityNeeded | Bool | Wether electricity is required or not for activation (default: True) |
RemoteActivated | Bool | If set to true this object can only be activated by another object/button and not by using it directly (default: false) |
Duration | Float | How long the object should remain active, if set to a negative number it will remain enabled forever (Default: 60) |
[Planned]OneRound | Bool | If set to true the object will remain active until the current round ends (default:???) |
Cooldown | Float | How long the object should be disabled after deactivation, if set to a negative number it will remain disabled forever (Default: 30) |
Cost | Int | How much points the activation will cost (Default: 0) |
Traps (WIP)
Traps are activatables that feature no additional variables. That means they can either be activated by remote (a button) or by using them directly (See RemoteActivated variable for more information)
Traps currently available
- nz_trap_turret
Traps can be scripted like any other SENT, but they must derive from nz_trapbase
in order to add activatable functionality. Also be careful when setting NWVars many slots are already used up.
Buttons
Buttons feature everything explained above. But in additon they can also activate other activatables. This means they can activate other buttons, traps, and doors. You can specify which objects should be activated by the button by using the following variables:
LinkedNZName1, LinkedNZName2, LinkedNZName3
- Type: String
- Description: The name(NZName) of the object that should be activated. If multiple objects with the same name exist all of these will be activated. If a door link with that name exist all doors with that link will be opened. A beam to the linkedobject should appear.
You can also customize a button's appearence by choosing a model from the ModelID dropdown.
AND Gates)
AND-Buttons (AND-Buttons are buttons that require multiple other buttons(or activatables) to be active at the same time in order to be activated themself.
ActivatorName1, ActivatorName2
- Type: String
- Description: The name(NZName) of an object that needs to be activated before the and-button will be activated. If multiple objects with the same name exist all of those will need to be activated.
LinkedNZName
- Type: String
- Description: The name of an object that should be activated once the and-button is activated.