Some scripting 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: Some scripting help (/thread-8207.html) |
Some scripting help - xtron - 05-23-2011 Well the title sais it all. anyways. How do i make so when the player passes a script box it makes the door infront of him open with a certain force?. And How do i make monsters patroll?. I've tried everything but it doesn't work. I added Spoiler below!
This is my current patroll node script. I've noticed that the people here are realy nice and help out so I wana thank you guys in advance ^^. Here's an attachment of my script file. If you need to take a look. RE: Some scripting help - ferryadams10 - 05-24-2011 dude You made PosNodeAreas but u should make PathNodeAreas RE: Some scripting help - xtron - 05-24-2011 (05-24-2011, 07:05 PM)ferryadams10 Wrote: dude oh. thanks . RE: Some scripting help - Mooserider - 05-25-2011 For making the door open, make a script area in your map where you want the player to walk into, then add this to the OnStart part of your script: Code: AddEntityCollideCallBack("Player", "ScriptArea", "DoorOpen", true, 1); Anyway, add this into your code (Not in onStart, just in a blank space) Code: void DoorOpen(string &in asParent, string &in asChild, int alState) Now, there are a couple things you have to do: 1. Change Door to the name of your door. 2. X, Y, and Z is the direction of the force. You'll need to find out which way your door opens and put a huge number like 10000 where the X Y or Z is depending on which way your door opens. The other coordinates that mean up or down can just be changed to 0. This concept confused me the first time I read it, so I'll have an example: Spoiler below!
3. If the door begins locked, you will need to add the following in with the AddPropImpulse and stuff. Code: SetSwingDoorLocked("Door", false, false); Code: void DoorOpened(string &in asTimer) And again, change Door to the name of your door. I hope I've helped you, Sorry if it was a bit of a long explanation, and if I've mucked up and the script doesn't work just tell me. |