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
How to make encounters?
Neatherblade Offline
Junior Member

Posts: 19
Threads: 5
Joined: Jan 2011
Reputation: 0
#16
RE: How to make encounters?

Try this Ethril.

void onStart()
{
AddUseItemCallback("", "strangekey_1", "cellar_wood01_2", "UsedKeyOnDoor", true);

AddEntityCollideCallback("Player", "corpseroom", "Collidecorpseroom", true, 1);
}


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

void Collidecorpseroom(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("cannibal", true);
}


void onEnter()
{

}

void OnLeave()
{

}

if you have it onEnter() the engine will run the script as soon you enter the map.
01-12-2011, 08:54 PM
Find


Messages In This Thread
How to make encounters? - by sacroid - 09-15-2010, 12:40 AM
RE: How to make encounters? - by MulleDK19 - 09-15-2010, 02:53 AM
RE: How to make encounters? - by sacroid - 09-15-2010, 06:26 AM
RE: How to make encounters? - by theDARKW0LF - 09-15-2010, 08:08 AM
RE: How to make encounters? - by sacroid - 09-15-2010, 08:16 AM
RE: How to make encounters? - by jens - 09-15-2010, 08:21 AM
RE: How to make encounters? - by sacroid - 09-15-2010, 08:25 AM
RE: How to make encounters? - by sacroid - 09-15-2010, 02:21 PM
RE: How to make encounters? - by jens - 09-15-2010, 02:31 PM
RE: How to make encounters? - by sacroid - 09-15-2010, 02:41 PM
RE: How to make encounters? - by Tony32 - 01-12-2011, 02:46 PM
RE: How to make encounters? - by sacroid - 09-15-2010, 04:24 PM
RE: How to make encounters? - by jens - 09-15-2010, 05:01 PM
RE: How to make encounters? - by sacroid - 09-15-2010, 05:11 PM
RE: How to make encounters? - by Ethril - 01-12-2011, 07:53 AM
RE: How to make encounters? - by Neatherblade - 01-12-2011, 08:54 PM



Users browsing this thread: 1 Guest(s)