Scripting fatal errors? - 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: Scripting fatal errors? (/thread-18772.html) |
RE: Scripting fatal errors? - The chaser - 10-14-2012 Ok, then. Do this: void Statuescare(string &in asParent, string &in asChild, int alState) { StartPlayerLookAt("Statue_1", 75, 100, ""); AddTimer("Scaretimer_1", 3, "STAHP"); } void STAHP (string &in asTimer) { StopPlayerLookAt(); } This will return the player to be normal. RE: Scripting fatal errors? - Rapsis - 10-14-2012 void OnStart() { FadeOut(0); FadeIn(10); AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, 0); AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true); AddEntityCollideCallback("Player", "Statuescare", "Statuescare", true, 1); AddEntityCollideCallback("Player", "darkmemento", "Darkmemento", true, 1); AddUseItemCallback("", "stairskey_1", "level_wood_1", "UsedKeyOnDoor_2", true); SetEntityConnectionStateChangeCallback("button_simple_1", "opendoor_1"); } void CollideRoomTwo(string &in asParent, string &in asChild, int alState) { AddTimer("Timer_1", 10, "Clearnodes_1"); SetSwingDoorClosed("mansion_2", true, true); SetSwingDoorLocked("mansion_2", true, true); SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, ""); } void Clearnodes_1(string &in asTimer) { ClearEnemyPatrolNodes("servant_grunt_1"); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false); RemoveItem("bedroomkey_1"); } void UsedKeyOnDoor_2(string &in asItem, string &in asEntity) { SetLevelDoorLocked("level_wood_1", false); PlaySoundAtEntity("", "unlock_door", "mansion_5", 0, false); RemoveItem("stairskey_1"); } void Statuescare(string &in asParent, string &in asChild, int alState) { StartPlayerLookAt("Statue_1", 75, 100, ""); AddTimer("Scaretimer_1", 3, "STAHP"); } void STAHP (string &in asTimer) { StopPlayerLookAt(); } void Darkmemento(string &in asParent, string &in asChild, int alState) { AddQuest("darkQuest","DarkQuest"); } void opendoor_1(string &in asEntity, int alState) { SetEntityActive("servant_grunt_2", true); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_9", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_10", 0, ""); AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_11", 0, ""); SetEntityActive("cabinet_metal_1", false); SetEntityActive("cabinet_metal_2", true); } void OnLeave() { } main (79,1) : ERR : Unexpected end of file Nevermind, deleted map1_cache and now it works ! Thanks a lot! Alright, moar questions: How do I add that sanity loss effect when you see some shit like a pile of bodies and your screen goes all shaky for a moment and your sanity goes down? And how do I get that blue-ish sanity gain effect? I couldn't find it on http://wiki.frictionalgames.com/hpl2/amnesia/script_functions RE: Scripting fatal errors? - Adny - 10-15-2012 void GiveSanityDamage(float afAmount, bool abUseEffect); and void GiveSanityBoost(); void GiveSanityBoostSmall(); Hope that helped. RE: Scripting fatal errors? - Rapsis - 10-26-2012 Alright, time to wake up this old, old post. Is it possible to make some stuff like drawers, small beds, tables etc. push-able? But I don't want ALL of those to be move-able, only some specific ones. RE: Scripting fatal errors? - The chaser - 10-26-2012 (10-26-2012, 10:32 AM)Rapsis Wrote: Alright, time to wake up this old, old post.Then you must go to the model editor and apply a body to it. Of course, there are a lot of settings to be changed, so... good luck. And you could make a new thread, this thread is for a script, not for models. RE: Scripting fatal errors? - Rapsis - 10-26-2012 (10-26-2012, 11:33 AM)The chaser Wrote:If I'll have more questions about models I will, but I now I just have one last question about them: Is it possible to use new models for custom stories? Or do I have to make a total conversion?(10-26-2012, 10:32 AM)Rapsis Wrote: Alright, time to wake up this old, old post.Then you must go to the model editor and apply a body to it. Of course, there are a lot of settings to be changed, so... good luck. RE: Scripting fatal errors? - ZodiaC - 10-26-2012 (10-26-2012, 11:37 AM)Rapsis Wrote: If I'll have more questions about models I will, but I now I just have one last question about them: Is it possible to use new models for custom stories? Or do I have to make a total conversion?yes it is possible to use new models for custom stories by saving them inside the entities folder. RE: Scripting fatal errors? - Tomato Cat - 10-26-2012 (10-14-2012, 04:36 PM)Rapsis Wrote: Can anyone do this script for me? I triedAh, sorry. 3= I meant call the function with a timer callback. Like how chaser explained. RE: Scripting fatal errors? - Rapsis - 10-26-2012 Alright, now I'm trying to make a skybox, and oh boy am I pissed. I've been trying to make one for around 4 or 5 hours I think; I have to figure everything out by myself because I can't find any USEFUL tutorials on the internet. So, I have GIMP with the .dds plugin. I can't find any single fucking skybox on the internet. Some tutorials say "Download a .CUBEMAP file from this place, it's FREEEEEEEEEEEEEEEE!": http://www.cgskies.com/sky.php?sky=338&type=blueclouded&hdronly=&sortby=rating&page=1&pagesize= (I need daytime to add some contrast) The fucking thing is, THERE IS NO .CUBEMAP FILE, JUST A DAMN JPG OR SOME SOME SHIT LIKE THAT. Can any one explain this shit like you would explain it to a retard? I don't get this crap AT ALL. RE: Scripting fatal errors? - The chaser - 10-26-2012 (10-26-2012, 04:29 PM)Rapsis Wrote: Alright, now I'm trying to make a skybox, and oh boy am I pissed.Caaalm down, Rapsis. You don't need any .CUBEMAP, for what I know. Just a .dds. Any .dds should work. But, remain to choose a big image and that ends with a multiple of 2. |