The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 doesnt work once again.
kartanonperuna Offline
Posting Freak

Posts: 755
Threads: 44
Joined: Oct 2011
Reputation: 8
#1
Script doesnt work once again.

Sorry for bothering all the time but reading all those scripting tutorials doesnt really help me.



////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("crowbar_joint_2", "crowcollide", "crowopen_func", true, 1);
AddUseItemCallback("", "crowbar_1", "prison_locked", "activatecrowdoor", true);
AddUseItemCallback("", "key_tomb_rusty", "cellar_wood01_slow", "KeyOnDoor", true);
AddUseItemCallback("", "key_torture_chamber_1", "hatch_metal01_1", "KeyOnDoor2", true);
AddUseItemCallback("", "key_study_1", "cellar_wood01_1", "KeyOnDoor3", true);
PlayMusic("humming ambient.ogg", true, 1.0f, 1.0f, 1, false);
AddEntityCollideCallback("Player", "TriggerArea1", "TriggerMonster", true, 1);
AddEntityCollideCallback("Player", "TriggerArea2", "TriggerMonster2", true, 1);
AddEntityCollideCallback("Player", "VoiceTrigger", "Prisoner", true, 1);
}

void Prisoner(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("prisoner edited.snt", "prisoner edited.snt", "Player", 94, true);
}

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

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

void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cellar_wood01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cellar_wood01_1", 0, false);
RemoveItem("key_study_1");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}

It says "expected )" or something in somewhere 18th line.
01-09-2012, 09:11 AM
Website Find


Messages In This Thread
Script doesnt work once again. - by kartanonperuna - 01-09-2012, 09:11 AM
RE: Script doesnt work once again. - by flamez3 - 01-09-2012, 09:23 AM
RE: Script doesnt work once again. - by flamez3 - 01-09-2012, 09:28 AM
RE: Script doesnt work once again. - by BlueFury - 01-09-2012, 09:53 AM



Users browsing this thread: 2 Guest(s)