I need help with a script - 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: I need help with a script (/thread-21307.html) |
I need help with a script - Neelke - 04-28-2013 I have this problem with "Unexpected end of file 2, 1242 " which is a regular problem with scripts. I know which area the problem exists but I just cannot find it, can you guys help me? Script below: //Player uses glass jar on heater/extracter/squeezer, but doesn't have the blood void GlassJarHeaterWithoutBlood(string &in asItem, string &in asEntity) { SetMessage("Messages", "GlassJarWithoutBlood", 0); } //Player uses glass jar on heater, with blood inside void GlassJarHeaterWithBlood(string &in asItem, string &in asEntity) { SetEntityActive("glass_container_blood_static_1", true); RemoveItem(asItem); PlaySoundAtEntity("placeglass", "26_place_glass", asEntity, 0.0f, false); //Delay the boil a bit AddTimer("BloodInPlace", 1, "TimerBloodInPlace"); } void TimerBloodInPlace(string &in asTimer) { SetLocalVarInt("BloodOnBurner", 1); //Check if blood is ready to boil! CheckBoilBlood(); } //------------------------------------------ void CheckBoilBlood() { //If the burner is a full speed, blood is in place and blood is not boiled yet, then if(GetLocalVarInt("BurnerReady")==1 && GetLocalVarInt("BloodOnBurner")==1 && GetLocalVarInt("BloodBoiled")==0) { SetLocalVarInt("BloodBoiled", 1); CreateParticleSystemAtEntity("bloodboil", "ps_glass_container_blood_bubbles.ps", "AreaBloodBoil", false); PlaySoundAtEntity("bloodboil","puzzle_boil.snt", "AreaBloodBoil", 1, false); AddTimer("boileffectdone", 3, "TimerBoilEffectDone"); } } void TimerBoilEffectDone(string &in asTimer) { DestroyParticleSystem("bloodboil"); StopSound("bloodboil",1); AddTimer("fadeoutblood", 0.3, "TimerBoilEffectFadeOutBlood"); SetPropActiveAndFade("glass_container_mix_notdone_1", true, 0.5); PlaySoundAtEntity("boildone","puzzle_acid", "AreaBloodBoil", 0, false); } void TimerBoilEffectFadeOutBlood(string &in asTimer) { SetPropActiveAndFade("glass_container_blood_static_1", false, 0.5); } //Player uses glass jar on squeezer/extracter, but blood is not boiled void JarSqueezerBloodNotBoiled(string &in asItem, string &in asEntity) { SetMessage("Messages", "BloodNeedsBoilFirst", -1); } //Player picks up the boiled blood void PickBoiledBlood(string &in asEntityName, string &in asType) { //Turn on/off a few scripts SetEntityActive("AreaGlassJarNoBlood", false); SetEntityActive("AreaGlassJarWithBloodNotBoiled", false); SetEntityActive("AreaGlassJarWithBlood", true); SetEntityActive("AreaSqueezerBloodBoiled", true); SetEntityActive("AreaSqueezerBloodNotBoiled", false); } //Player uses glass jar on squeezer with blood boiled void JarSqueezerBloodBoiled(string &in asItem, string &in asEntity) { SetEntityActive("glass_container_mix_notdone_static_1", true); } //Player uses emerald stone to proceed with the potion void EmeraldStoneOnSqueezer(string &in asItem, string &in asEntity) { SetEntityActive("orbpiece_emerald_1", true); } RE: I need help with a script - Tomato Cat - 04-28-2013 I think the problem lies elsewhere. Can you post your entire script in spoiler & php tags? |