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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Crashes Custom Story -SOLVED-
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#5
RE: Script Crashes Custom Story?

void OnStart()
{
AddUseItemCallback("", "key1", "castle_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key2", "metal_1", "UsedKeyOnDoor2", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("key1");
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("metal_1", false, true);
PlaySoundAtEntity("", "unlock_door", "metal_1", 0, false);
RemoveItem("key2");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Try that.

Creator of The Dark Treasure.
04-01-2011, 08:02 PM
Website Find


Messages In This Thread
Script Crashes Custom Story -SOLVED- - by Shoop - 04-01-2011, 06:45 PM
RE: Script Crashes Custom Story? - by MrBigzy - 04-01-2011, 06:51 PM
RE: Script Crashes Custom Story? - by Shoop - 04-01-2011, 07:02 PM
RE: Script Crashes Custom Story? - by MrBigzy - 04-01-2011, 08:02 PM
RE: Script Crashes Custom Story? - by Linus Ågren - 04-01-2011, 08:02 PM
RE: Script Crashes Custom Story? - by Shoop - 04-01-2011, 08:10 PM



Users browsing this thread: 1 Guest(s)