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
2 Script error
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#5
RE: 2 Script error

(07-01-2011, 12:04 PM)Hellday Wrote: Like this :

void OnStart()
{

SetEntityPlayerInteractCallback("lantern_1", "Spawn_Monster", true);

}

void Spawn_Monster(string &in entity)
{

SetEntityActive("servant_grunt_1", true);
}

void UseKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
AddUseItemCallback("useexit", "key_1", "coffre", "UseKey",true);
RemoveItem(asItem);
}
?
Thanks their is no crash but my ket doesn't works Sad


Try this: OnStart inside the brackets like this:

void OnStart()
{
AddUseItemCallback("useexit", "key_1", "coffre", "UseKey",true);
SetEntityPlayerInteractCallback("lantern_1", "Spawn_Monster", true);
}


void OnEnter()
{
}


void Spawn_Monster(string &in entity)
{
SetEntityActive("servant_grunt_1", true);
}

void UseKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("name of the door?", false, true);
RemoveItem(asItem);
PlaySoundAtEntity("", "unlock_door.snt", "name of the door?", 0.0f, true);
}

That should do it.


“Life is a game, play it”
07-01-2011, 03:57 PM
Find


Messages In This Thread
2 Script error - by Hellday - 07-01-2011, 11:46 AM
RE: 2 Script error - by TFEF - 07-01-2011, 11:57 AM
RE: 2 Script error - by Hellday - 07-01-2011, 12:04 PM
RE: 2 Script error - by HumiliatioN - 07-01-2011, 03:57 PM
RE: 2 Script error - by TFEF - 07-01-2011, 12:49 PM
RE: 2 Script error - by Hellday - 07-01-2011, 05:35 PM
RE: 2 Script error - by HumiliatioN - 07-01-2011, 10:38 PM



Users browsing this thread: 2 Guest(s)