Same script... really!? - 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: Same script... really!? (/thread-13703.html) |
Same script... really!? - Saren - 03-02-2012 Okay so I got 2 monsters in the same map, and ofc you have to use this script: void MonsterFunction(string &in asParent, string &in asChild, int alState) As far as I know.. but when I launch the game it says it's already there like, it dos'nt like me adding it again.... what's up with that? The script is like this: //Foodstorage grunt void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt_foodstorage", true); ShowEnemyPlayerPosition("grunt_foodstorage"); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_6", 0, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_7", 0, ""); AddEnemyPatrolNode("grunt_foodstorage", "PathNodeArea_8", 0, ""); } void Despawngrunt_foodstorage(string &in asParent , string &in asChild , int alState) { SetEntityActive("grunt_foodstorage", false); } //Penumbra dog void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("guard_dog", true); ShowEnemyPlayerPosition("guard_dog"); AddEnemyPatrolNode("guard_dog", "PathNodeArea_9", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_10", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_11", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_12", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_13", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_14", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_15", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_16", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_17", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_18", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_19", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_20", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_21", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_22", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_23", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_24", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_25", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_26", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_27", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_28", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_29", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_30", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_31", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_32", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_33", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_34", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_35", 0, ""); AddEnemyPatrolNode("guard_dog", "PathNodeArea_36", 0, ""); RE: Same script... really!? - flamez3 - 03-02-2012 Change one of the MonsterFunction to MonsterFucntion2. Also do this in the callback aswell. RE: Same script... really!? - Saren - 03-02-2012 (03-02-2012, 11:10 AM)flamez3 Wrote: Change one of the MonsterFunction to MonsterFucntion2. Also do this in the callback aswell.Oohhh, you can add numbers... nice, thx dude RE: Same script... really!? - Your Computer - 03-02-2012 (03-02-2012, 11:11 AM)Saren Wrote: Oohhh, you can add numbers... nice, thx dude Or you can do it all in the same function, which is the practical way of doing it given the purpose of the function, and rely on the parent and child variables to determine what to do. |