90 lines
4.6 KiB
Plaintext
90 lines
4.6 KiB
Plaintext
|
void main()
|
||
|
{
|
||
|
string levertag = GetTag(OBJECT_SELF);
|
||
|
|
||
|
if(GetLocalInt(OBJECT_SELF, "leverused") != 1)
|
||
|
{
|
||
|
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||
|
SetLocalInt(OBJECT_SELF, "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock6", 1);
|
||
|
if(GetLocalInt(GetObjectByTag("Lever5"), "leverused") !=1)
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever5"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever5"), "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock5", 1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever5"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever5"), "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock5", 0);
|
||
|
}
|
||
|
if(GetLocalInt(GetObjectByTag("Lever7"), "leverused") !=1)
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever7"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever7"), "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock7", 1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever7"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever7"), "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock7", 0);
|
||
|
}
|
||
|
if(GetLocalInt(GetObjectByTag("Lever9"), "leverused") !=1)
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 0);
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||
|
SetLocalInt(OBJECT_SELF, "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock6", 0);
|
||
|
if(GetLocalInt(GetObjectByTag("Lever5"), "leverused") !=1)
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever5"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever5"), "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock5", 1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever5"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever5"), "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock5", 0);
|
||
|
}
|
||
|
if(GetLocalInt(GetObjectByTag("Lever7"), "leverused") !=1)
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever7"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever7"), "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock7", 1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever7"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever7"), "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock7", 0);
|
||
|
}
|
||
|
if(GetLocalInt(GetObjectByTag("Lever9"), "leverused") !=1)
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 1);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
AssignCommand(GetObjectByTag("Lever9"), ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(GetObjectByTag("Lever9"), "leverused", 0);
|
||
|
SetLocalInt(GetObjectByTag("ty_puzzledoor"), "lock9", 0);
|
||
|
}
|
||
|
}
|
||
|
}
|