Type: Player Brain
Level: 2 star
Pages: 1
Description: When activated this kode gives the player 10 seconds of invulnerability which is indicated by a hologram effect.
This kode is not standalone and needs to be added to a player brain through call page or Multibrain. Is designed to be used with the Weapon brain Melee Weapon – Ice Armor.
Kode
- WHEN [once]
- …WHEN DO [numvar:invulnerability duration][equals][10 ]// change this number for longer or shorter invulnerability time
- …WHEN DO [numvar: default color intensity][equals][color intensity]
- …WHEN DO [play fx][fx:Metal Debris]
- WHEN DO [color intensity][equals][0]
- WHEN DO [hologram][custom color]
- WHEN DO [plax fx][fx:Sparkle]
- WHEN DO [invulnerable][equals][true]
- WHEN [equipment][changed][or][countdown timer][invulnerability duration]
- …WHEN DO [play fx][fx:Metal debris]
- …WHEN DO [color intensity][equals][numvar: default color intensity]
- …WHEN DO [invulnerable][equals][false]
- …WHEN DO [remove brain][this brain]
Alterations
Add this ability on a cooldown
At the moment this invulnerability only happens when you first activate the brain, then it is gone. It is designed to be added to a weapon brain like this:
WHEN[started to] [equipped] DO [owner][add brain][Power Up – Invulnerability]
This is a cooldown mechanic. When the player presses the Left button they get 3 seconds of invulnerability and a 10 second cooldown period until they can activate it again. To implement this you will need to make a new brain (best use a templated logic cube) and use IWP instead of the gallery brain.
- WHEN [not][boolvar:cooldown]
- …WHEN [left bumper][pressed] DO [boolvar:skill][equals][true]
- WHEN [boolvar:skill]
- …WHEN [started to] DO [numvar:invulnerability duration][equals][3]
- …/…WHEN DO [numvar: default color intensity][equals][color intensity]
- …/…WHEN DO [play fx][fx:Metal Debris]
- …WHEN DO [color intensity][equals][0]
- …WHEN DO [hologram][custom color]
- …WHEN DO [plax fx][fx:Sparkle]
- …WHEN DO [invulnerable][equals][true]
- …WHEN [equipment][changed][or][countdown timer][invulnerability duration]
- …/…WHEN DO [play fx][fx:Metal debris]
- …/…WHEN DO [color intensity][equals][numvar: default color intensity]
- …/…WHEN DO [invulnerable][equals][false]
- …/…WHEN DO [boolvar:skill][equals][false]
- …/…WHEN DO [boolvar:cooldown][equals][true]
- WHEN [boolvar:cooldown]
- …WHEN [started to] DO [numvar:default cooldown][equals][10] // the length of the cooldown
- …/…WHEN DO [numvar:cooldown][equals][numvar:default cooldown]
- …WHEN [countdown timer][numvar:default cooldown] DO [boolvar:countdown][equals][false]
- …WHEN [countdown timer][loop] DO [numvar:cooldown][decrement by][1]
- …WHEN [duration][numvar:default cooldown] DO [display meter][numvar:cooldown][max][numvar:default cooldown][screen top center][color:blue]