void main()
{
object oPC = GetLastUsedBy(); //get pc's name for the message
object oAlarm1 = OBJECT_SELF; //object the script is on, first alarm device
object oAlarm2 = GetLocalObject(oAlarm1,"LINKED_OBJECT"). //get object oAlarm2, stored as a variable on the object the script is on
string sMessage = "You have activated the alarm!"; //the message to be sent to the pc activating the gong
SendMessageToPC(oPC, sMessage); //sends the message off
ExecuteScript("alarmgoesoff",oAlarm2); //execute the scripts on the objects
ExecuteScript("alarmgoesoff",oAlarm1);
}
Everything in the script works except for the Get LocalObject line (because if i just plug in the variable name, the script fires as it's supposed to). As is, oAlarm1 activates, but oAlarm2 does not.
Would appreciate the help.
Modifié par MammonTheViscount, 26 juillet 2010 - 08:10 .





Retour en haut






