generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
19
_module/nss/gate_lever.nss
Normal file
19
_module/nss/gate_lever.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
object oGate = GetObjectByTag("arena_gate");
|
||||
int oLocked = GetLocked(oGate);
|
||||
if (oLocked==TRUE)
|
||||
{
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_HIT_ELECTRICAL), oGate);
|
||||
SetLocked(oGate, FALSE);
|
||||
DelayCommand(2.0, FloatingTextStringOnCreature("Gate unlocked", oPC));
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySound("sim_cntresist");
|
||||
FloatingTextStringOnCreature("This gate is already unlocked", oPC);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user