Hpl 2 help - 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: Hpl 2 help (/thread-20872.html) Pages:
1
2
|
RE: Hpl 2 help - s2skafte - 03-25-2013 (03-25-2013, 01:53 AM)Your Computer Wrote: SetSwingDoorClosed is missing a closing quotation in Collideroomtwo. not sure what you meant there but i got a new problem. this is a new script for te next map and i get that error 14,1 unexpected token '{' void Onstart() { AddUseItemCallback("", "key_tower_2", "Lockeddoor_3", "hello3", true); SetEntityCallbackFunc("key_tower_2", "OnPickup"); } void hello3(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_Lockeddoor_3", asEntity, 0, false); RemoveItem(asItem); } { SetEntityActive("Monster_grunt_1", true); ShowEnemyPlayerPosition("Monster_grunt_1"); } RE: Hpl 2 help - NaxEla - 03-25-2013 1. Should be OnStart, not Onstart (you need a capital 'S') 2. These two lines Code: SetEntityActive("Monster_grunt_1", true); 3. You wrote OnPickup for the callback for SetEntityCallbackFunc, but you didn't put that function anywhere. I'm assuming that you want those two lines (above) to happen when the player picks up the key? Try using this script. PHP Code: void OnStart() RE: Hpl 2 help - s2skafte - 03-25-2013 Thanks i will update this thread if i run into any more problems. if anybody coud help me out with the other script that would be great. RE: Hpl 2 help - s2skafte - 03-25-2013 i have got another problem unexpected token 21,1 '{' New script for new map void OnStart() { AddEntityCollideCallback("Player", "push", "Push", true, 1); AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1); } void Push(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "react_pant.snt", "push", 0, false); AddPlayerBodyForce(-300000, 0, 0, false); } void Slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("cellar_1", true, true); SetSwingDoorLocked("cellar_1", true, true); PlaySoundAtEntity("", "break_wood.snt", "door_scare", 0, false); } { AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, ""); } RE: Hpl 2 help - PutraenusAlivius - 03-26-2013 void OnStart() { AddEntityCollideCallback("Player", "push", "Push", true, 1); AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1);AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); } void Push(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "react_pant.snt", "push", 0, false); AddPlayerBodyForce(-300000, 0, 0, false); } void Slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("cellar_1", true, true); SetSwingDoorLocked("cellar_1", true, true); PlaySoundAtEntity("", "break_wood.snt", "door_scare", 0, false); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, ""); } |