Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"if" remove message [Solved :D]
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: "if" remove message

void OnStart()
{
    SetLocalVarInt("DoorUnlocked",0); //Say door is locked
    if(ScriptDebugOn())
    {
        GiveItemFromFile("lantern", "lantern.ent");
        SetPlayerLampOil(100.0f);

        for(int i = 0;i < 10;i++)
        {
              GiveItemFromFile("tinderbox", "tinderbox.ent");
        }
    }
}

void UsedHoneyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("mansion_1", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
    RemoveItem("Honey");
    SetLocalVarInt("DoorUnlocked",1); //Say door is unlocked
}

void LockedDoor(string &in entity)
{
    if(GetLocalVarInt("DoorUnlocked")==0)
         { //If door is locked, display the message.
           SetMessage("TestStory", "ItemDesc_mansion_1", 0);
         }
}
05-30-2011, 02:56 PM
Find


Messages In This Thread
"if" remove message [Solved :D] - by DannieWest - 05-30-2011, 02:34 PM
RE: "if" remove message - by Apjjm - 05-30-2011, 02:56 PM
RE: "if" remove message - by Kyle - 05-30-2011, 02:57 PM
RE: "if" remove message - by DannieWest - 05-30-2011, 04:13 PM
RE: "if" remove message - by Apjjm - 05-30-2011, 05:19 PM
RE: "if" remove message - by Kyle - 05-30-2011, 04:53 PM
RE: "if" remove message - by DannieWest - 05-30-2011, 10:00 PM



Users browsing this thread: 1 Guest(s)