Skip to main content

UnlockingGenerator

Gets called when the player is unlocking the generator.

Start a script section

!-- OnEvent UnlockingGenerator
-- require @evPlayer *evGenerator $evCanOpen $evIsAllowed

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerUnlockingGeneratorEventArgs

Injected variables

VariableTypeDescription
@evPlayerplayer valueGets the player who is unlocking the generator.
*evGeneratorreference to Generator objectThe generator that is involved in the event.
$evCanOpenbool valueGets whether the player can open the generator.
$evIsAllowedbool valueGets whether this event is allowed. Not allowing this event will not unlock the generator and no denied animation is played.