![]() |
Anyone need 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Anyone need help? (/thread-7825.html) |
RE: Anyone need help? - xtron - 05-22-2011 (05-22-2011, 08:10 PM)Kyle Wrote: Did you name it correctly? Check and make sure that the PathNode is called what you want it to be called. I made 9 nodes and their named like: PosNodeArea_1, PosNodeArea_2, PosNodeArea_3 etc. And the script file looks like this Code: void monsterspawn(string &in asEntity) RE: Anyone need help? - Kyle - 05-22-2011 If it doesn't work, try this. Otherwise, you don't need to look at this. :p Code: void monsterspawn(string &in asEntity) RE: Anyone need help? - xtron - 05-22-2011 (05-22-2011, 08:47 PM)Kyle Wrote: If it doesn't work, try this. Otherwise, you don't need to look at this. :p Can you explain this please?. Because I want to learn how to script ^^ RE: Anyone need help? - Kyle - 05-22-2011 Alright. First let me tell you a little about scripting. Amnesia uses a type of scripting language that is similar to C++. It is called AngelScript. A "for" statement is used to make multiple instances of something. For example: int x; // an integer called x for (int x = 1; x > 0 && x < 10; x++) // So int x is equal to 1. x has to be greater than 0 and x has to be less that 10. Making 9 instances of x. Then increment x by 1 each time, and once x is greater than 9, the "for" statement is disabled. Thus creating no more instances of x. for (int x = 1; x > 0 && x < 10; x++) { AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_"+x, 0, ""); } // This creates 9 patrol nodes, each with a different "PosNodeArea_"+x. This is how it would look like without a "for" statement: AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_1", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_2", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_3", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_4", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_5", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_6", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_7", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_8", 0, ""); AddEntityPatrolNode("monster_key_keeper1", "PosNodeArea_9", 0, ""); For more information on some scripting, go to my thread: http://www.frictionalgames.com/forum/thread-7929.html? RE: Anyone need help? - xtron - 05-23-2011 Thanks for the help ![]() But regarding the second question i wrote. When i pass a script a certain door takes enough damage that it destroys. And A entity moves from point A to point B. Do you know how to make a script for these kind of stuff?. If you want me to be more clear please tell me. RE: Anyone need help? - RawkBandMan - 05-23-2011 (05-22-2011, 05:05 PM)Kyle Wrote:(05-21-2011, 03:36 PM)XxRoCkBaNdMaNxX Wrote: I have yet another question. Not much of a scripting question, because the scripting part of it I know. Alrite... How can I change them if I make a full conversion? RE: Anyone need help? - xtron - 05-23-2011 Kyle. How do i make a script so when my player passes a certain script box a door opens with power so the player shit him self XD. RE: Anyone need help? - WatzUpzPeepz - 05-23-2011 (05-23-2011, 05:41 PM)xtron Wrote: Kyle. How do i make a script so when my player passes a certain script box a door opens with power so the player shit him self XD. Well you can do this: Code: void OnStart() RE: Anyone need help? - RawkBandMan - 05-23-2011 (05-23-2011, 07:45 PM)WatzUpzPeepz Wrote:(05-23-2011, 05:41 PM)xtron Wrote: Kyle. How do i make a script so when my player passes a certain script box a door opens with power so the player shit him self XD. This looks like it would close the door and not open it. RE: Anyone need help? - Simpanra - 05-23-2011 How do i make my player walk forward of their own accord WITHOUT the scripts from justine? |