18 lines
539 B
Plaintext
18 lines
539 B
Plaintext
void main()
|
|
{
|
|
int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
|
|
// * Play Appropriate Animation
|
|
if (!nActive)
|
|
{
|
|
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
|
AssignCommand(OBJECT_SELF, ActionStartConversation(GetLastUsedBy(), "orb_summon"));
|
|
SoundObjectPlay(GetObjectByTag("MagicGlowingBall"));
|
|
}
|
|
//else
|
|
//{
|
|
// ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
|
//}
|
|
// * Store New State
|
|
SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",!nActive);
|
|
}
|