generated from Jaysyn/ModuleTemplate
23 lines
660 B
Plaintext
23 lines
660 B
Plaintext
// remember to set the levers initial variable of Activated to 0
|
|
|
|
void main()
|
|
{
|
|
int a = GetLocalInt(OBJECT_SELF,"Activated");
|
|
if (a == 0)
|
|
{
|
|
AssignCommand((OBJECT_SELF),ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
SetLocalInt(OBJECT_SELF, "Activated", 1);
|
|
location lBed1 = Location(GetArea(OBJECT_SELF),Vector(16.80f,62.85f,0.0),274.0);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE,"zep_tower014",lBed1,FALSE,"set131");
|
|
|
|
}
|
|
if (a == 1)
|
|
{
|
|
AssignCommand((OBJECT_SELF),ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
SetLocalInt(OBJECT_SELF, "Activated", 0);
|
|
object oBed1 = GetNearestObjectByTag ("set131");
|
|
DestroyObject(oBed1);
|
|
|
|
}
|
|
}
|