ATDD-Scripting - 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: ATDD-Scripting (/thread-23321.html) Pages:
1
2
|
ATDD-Scripting - LordOfDragons - 09-22-2013 Hello guys, after i created my first cs (Just 5 minutes of gameplay) im finally ready to create a bigger thing. But i got a question: I want the player to wake up in his bedroom and i dont know how to script that at all. Its a bit difficult Could someone help? RE: ATDD-Scripting - PutraenusAlivius - 09-22-2013 http://www.frictionalgames.com/forum/thread-4626.html Don't post in that thread. Post here if you have any problems. EDIT: Nevermind that. The thread is closed. RE: ATDD-Scripting - LordOfDragons - 09-22-2013 Oh, sorry if i posted it in the wrong section. Didnt see that thread when checking the forum... When its wrong, im sure a mod will move it :L Could someone help btw? Im rly stuck right now. RE: ATDD-Scripting - LordOfDragons - 09-22-2013 I dont know where to put the script text exactly... RE: ATDD-Scripting - DamnNoHtml - 09-22-2013 You have a create an .hps file with the same name as your map. So, if your map is named 01_house.map, you would make a file called 01_house.hps. (To do that, open notepad, hit save as, change .txt to 'All Files' and then type 01_house.hps. There, you open the script file, and enter this: Code: void OnStart() { RE: ATDD-Scripting - LordOfDragons - 02-09-2014 (09-22-2013, 06:43 PM)DamnNoHtml Wrote: You have a create an .hps file with the same name as your map. So, if your map is named 01_house.map, you would make a file called 01_house.hps. (To do that, open notepad, hit save as, change .txt to 'All Files' and then type 01_house.hps. So i just have to put that into my .hps file? I mean exactly like that. RE: ATDD-Scripting - Wapez - 02-09-2014 Yes, and when you copied that and put it in your map you need to write this below it: void OnEnter() { } void OnLeave() { } It's a simple wake up function but it works. Personally I would use a switch loop for best effect. RE: ATDD-Scripting - LordOfDragons - 02-09-2014 Hm that script is new to me, so i dont get it. If i could see a tutorial or something like that it would be easier to understand where to put it. I guess i have to put it on void onStart() but i dont rly know. I will test, but there prob will be some errors. RE: ATDD-Scripting - Mudbill - 02-10-2014 (02-09-2014, 08:41 PM)Wapez Wrote: Yes, and when you copied that and put it in your map you need to write this below it: I'm guessing the semi-colons were just typos. @OP They are not supposed to be there though. These are also not required, but if you want to run scripts as the player is re-entering or leaving the level, use those. OnStart is only ran the first time the player loads the map, in case you didn't know. RE: ATDD-Scripting - LordOfDragons - 02-10-2014 Yes but i just dont get how to write it in there correctly... Anyone got a tutorial i can watch, to see how to do it? |