[HELP] Script Enabling/Variables - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [HELP] Script Enabling/Variables (/thread-16639.html) |
RE: [HELP] Script Enabling/Variables - Cruzore - 07-05-2012 Yes, try it out anyway. RE: [HELP] Script Enabling/Variables - himynamebob1 - 07-06-2012 Doesn't work. RE: [HELP] Script Enabling/Variables - Cruzore - 07-06-2012 Sorry, messed up. Instead of using a UseItematEntity Callback, use this: SetEntityCallbackFunc("name of furnace here", "IgnitetheFurnace"); void IgnitetheFurnace(string &in asEntity, string &in type) { if(type == "OnIgnite") { //Stuff to happen here } } RE: [HELP] Script Enabling/Variables - himynamebob1 - 07-06-2012 ERR: 'type' is not declared ERR: Expression must be of a boolean type RE: [HELP] Script Enabling/Variables - himynamebob1 - 07-06-2012 Ah, and when I put "" around type it still does not operate correctly. RE: [HELP] Script Enabling/Variables - Cruzore - 07-06-2012 paste your script again. RE: [HELP] Script Enabling/Variables - himynamebob1 - 07-06-2012 //=========================================== // This runs when the player enters the map void OnStart() { AddUseItemCallback("phekeg", "breakkegknife", "winekegpop", "boomkegopen", true); AddTimer("brute", 13.0f, "noisy"); SetEntityCallbackFunc("bonfire_1", "boomkegopen22"); } void boomkegopen22(string &in asItem, string &in asEntity) { if("type" == "OnIgnite") { AddUseItemCallback("phekegs2", "fullowine", "sheetmet", "boomkegopen23", true); } } void boomkegopen23(string &in asItem, string &in asEntity) { SetEntityActive("glasnotdone", true); RemoveItem("fullowine"); AddTimer("brute223", 5.0f, "outahere34"); } void outahere34(string &in asTimer) { if(GetGlobalVarInt("proccess")==2) { SetEntityActive("glasnotdone", false); SetEntityActive("done", true); } } void boomkegopen2(string &in asItem, string &in asEntity) { SetEntityActive("glass_container_2", true); AddTimer("brute223", 5.0f, "outahere3"); RemoveItem("glass_container_1"); PlaySoundAtEntity("bruto23", "19_pour_blood.snt", "Player", 0.0f, false); } void outahere3(string &in asTimer) { SetEntityActive("glass_container_2", false); SetEntityActive("fullowine", true); } void boomkegopen(string &in asItem, string &in asEntity) { PlaySoundAtEntity("bruto2", "19_inject.snt", "Player", 0.0f, false); SetEntityActive("breakkeg_1", true); AddTimer("brute23", 2.0f, "outahere"); RemoveItem("breakkegknife"); AddUseItemCallback("phekegs", "glass_container_1", "boardone", "boomkegopen2", true); } void outahere(string &in asTimer) { SetEntityActive("wineout", true); SetEntityActive("breakkeg_1", false); FadeInSound("wineout", 1.0f, true); CreateParticleSystemAtEntity("hhgh", "ps_liquid_epoxy.ps", "breakkeg_1", true); } void noisy(string &in asTimer) { PlaySoundAtEntity("bruto", "enabled01.snt", "brutenoise", 0.0f, false); AddTimer("brute2", 4.5f, "noie"); } void noie(string &in asTimer) { PlayMusic("04_amb.ogg", true, 1.0, 0.0f, 0, false); } //=========================================== // This runs when the player leaves the map void OnLeave() { } RE: [HELP] Script Enabling/Variables - Cruzore - 07-06-2012 SetEntityCallbackFunc("bonfire_1", "boomkegopen22"); } void boomkegopen22(string &in asItem, string &in asEntity) wrong callback snytax. change it to: void boomkegopen22(string &in asEntity, string &in type) It doesn't really matter what you name them, but you asked for "type", but you declared the type as "asEntity". |