FANDOM



For Objects Edit

You would place this script in the OnUsed handle. Remove the parts (or comment out) you don't want to use.

void main()
{
    object oPC = GetLastUsedBy();
    // For floating text
    FloatingTextStringOnCreature("Your Message",oPC);
    // For speaking a string, text is displayed for one heartbeat.
    SpeakString("Your Message");
    // For a private message.
    SendMessageToPC(oPC,"Your Message");
}

For Doors Edit

You can place it in the OnUsed, but usually doors say something because it is locked. In that case you would need to place this script in the OnFailed to open. Same as above but oPC is now GetClickingObject().

void main()
{
    object oPC = GetClickingObject();
    // For floating text
    FloatingTextStringOnCreature("Your Message",oPC);
    // For speaking a string, text is displayed for one heartbeat.
    SpeakString("Your Message");
    // For a private message
    SendMessageToPC(oPC,"Your Message");
}