REsolved - 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: REsolved (/thread-17141.html) |
REsolved - zecuro - 07-20-2012 hi guys have a bit of problem with my hps file here......they tell me something wrong with it void OnStart() { AddUseItemCallback("", "key_1", "mansion_3", "FUNCTION", true); } void FUNCTION(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door", asEntity, 0, false); RemoveItem(asItem); } void OnStart() { AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1); } void Explode(string &in asParent, string &in asChild, int alState) { SetPropHealth("pot_explode", 0); } void OnEnter() { } void OnLeave() { void OnEnter() { AddEntityCollideCallback("Player", "bang", "func_slam", true, 1); } void func_slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("mansion_2", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); } RE: Script help!!!!! - Traggey - 07-20-2012 Wrong section, moving to development support. RE: Script help!!!!! - Steve - 07-20-2012 you forgot the } at void OnLeave() RE: Script help!!!!! - zecuro - 07-20-2012 (07-20-2012, 07:59 PM)Steve Wrote: you forgot the } at void OnLeave() ??? RE: Script help!!!!! - Your Computer - 07-20-2012 (07-20-2012, 08:32 PM)zecuro Wrote: ??? In other words, OnEnter and func_slam are inside OnLeave. You also have two OnStart functions. RE: Script help!!!!! - zecuro - 07-20-2012 (07-20-2012, 09:13 PM)Your Computer Wrote:(07-20-2012, 08:32 PM)zecuro Wrote: ??? i don't understand really cuz i try the script befor and it work well the slaming door and the key script but when i tried the script for exploding pot well added it to my hps file it dosent work did i place it wrong.... RE: Script help!!!!! - zecuro - 07-20-2012 like this ???? void OnStart() { AddUseItemCallback("", "key_1", "mansion_3", "FUNCTION", true); } void FUNCTION(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door", asEntity, 0, false); RemoveItem(asItem); } { AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1); } void Explode(string &in asParent, string &in asChild, int alState) { SetPropHealth("pot_explode", 0); } void OnEnter() { } void OnLeave() { void OnEnter() { AddEntityCollideCallback("Player", "bang", "func_slam", true, 1); } void func_slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("mansion_2", true, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); } RE: Script help!!!!! - Your Computer - 07-21-2012 (07-20-2012, 11:31 PM)zecuro Wrote: like this ???? No. Like this: PHP Code: void OnStart() |