![]() |
Scripting n00b in need of 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: Scripting n00b in need of help. (/thread-5425.html) |
RE: Scripting n00b in need of help. - Chilton - 11-13-2010 (11-13-2010, 03:30 PM)Akumasama Wrote: So the function that you create with one of the functions in the list, has a standard syntax?Close - You need OnEnter, OnStart and OnLeave for the map to load up in the first place :p Or OnEnter at least, as its the default initialiser. Im just going to actually write a hypothetical script using the previously mentioned basis to ensure we're on the same page void OnStart() { AddEntityCollideCallback("Player", "Origin", "scareactivate", true, 1); } void scareactivate(string &in asParent, string &in asChild, int alState) { void ChangeMap("Map2", "Player_Start_Area_1", "", ""); } Thats purely an example, and wouldnt work unless you had a map named Map2, and a spawn called Player_Start_Area_1 Best of luck, feel free to post or PM any further questions RE: Scripting n00b in need of help. - Akumasama - 11-13-2010 Thanks Chilton, Cellrage and Gamekingdude. I'll post on this topic again should I have another problem. RE: Scripting n00b in need of help. - anzki - 11-13-2010 And also you don't need to have OnStart, OnEnter and OnLeave! RE: Scripting n00b in need of help. - Frontcannon - 11-13-2010 You don't even need a .hps to load a map. RE: Scripting n00b in need of help. - Akumasama - 11-13-2010 Yep, you don't need a .hps file to load a file. I ran my map quite a few times without the hps. The only thing you need, is a config file at the root of your story, and a map. Okay, sorry for double post, but I thought it wouldn't get "bumped" to the top again and get unseen messages ![]() I can't find a proper Script Function to give a door a small push so it opens a bit. Code: void OnStart() I've tested if the trigger worked, and the door did unlock. So it only has to get a little push now. I tried "RotatePropToSpeed", but it makes the door ummm... well float and unable to be used. RE: Scripting n00b in need of help. - Frontcannon - 11-13-2010 I'd go with AddPropForce here, and use SetSwingDoorDisableAutoclose so it doesn't 'stick' to being close. RE: Scripting n00b in need of help. - Akumasama - 11-13-2010 I've seen that one too, but I'm not sure what I would do with asCoordSystem? RE: Scripting n00b in need of help. - Frontcannon - 11-13-2010 Use either "World" or just "", it's not really important. RE: Scripting n00b in need of help. - Akumasama - 11-13-2010 (11-13-2010, 10:05 PM)Frontcannon Wrote: Use either "World" or just "", it's not really important. Okay thanks! RE: Scripting n00b in need of help. - Akumasama - 11-14-2010 Well that didn't quite work... Code: SetSwingDoorLocked("doorlantern", false, false); I have also tried "World" instead of "". Also tried different values at the coordinates. I have also tried SetSwingDoorClosed("doorlantern", false, false). It didn't work. This is used by the Frictional Games, as far as I've seen. Code: void OnStart() Just posting this too if it helps. EDIT: I noticed that the door only unlocks, but still auto-closes... That's kinda vague if you ask me. Does anyone know what could be it? :/ |