Multiple use of a void OnStart, need help D: - 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: Multiple use of a void OnStart, need help D: (/thread-16010.html) |
RE: Multiple use of a void OnStart, need help D: - KeysOfMyMind - 03-16-2013 (03-16-2013, 03:51 PM)JustAnotherPlayer Wrote:(03-16-2013, 03:49 PM)No Author Wrote: You could have just create a new thread instead bumping a year old thread. I'm sorry I'll keep an eye on the dates from now on. Also I've fixed my problem, the script doesn't make the game crash anymore, instead it doesn't do anything. RE: Multiple use of a void OnStart, need help D: - PutraenusAlivius - 03-16-2013 (03-16-2013, 03:57 PM)KeysOfMyMind Wrote:(03-16-2013, 03:51 PM)JustAnotherPlayer Wrote:(03-16-2013, 03:49 PM)No Author Wrote: You could have just create a new thread instead bumping a year old thread. Give us your fixed script. RE: Multiple use of a void OnStart, need help D: - KeysOfMyMind - 03-16-2013 void OnStart() { AddUseItemCallback("", "crowbar_1", "mansiondoor1", "UsedCrowbarOnDoor", true); AddEntityCollideCallback("crowbar_joint_1", "ScriptArea_Joint", "CollideAreaBreakDoor", true, 1); } void UsedCrowbarOnDoor(string &in asItem, string &in asEntity) { AddTimer("", 0.2, "TimerSwitchShovel"); RemoveItem("crowbar_1"); } void TimerSwitchShovel(string &in asTimer) { PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false); SetEntityActive("crowbar_joint_1", true); } void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState) { AddPlayerSanity(25); PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false); SetSwingDoorLocked("mansiondoor1", false, true); AddPropImpulse("mansiondoor1", 0, 0, -50, "World"); SetSwingDoorDisableAutoClose("mansiondoor1", true); SetSwingDoorClosed("mansiondoor1", false, false); SetMoveObjectState("mansiondoor1", 1); PlaySoundAtEntity("","break_wood_metal", "ScriptArea_Dust", 0, false); CreateParticleSystemAtEntity("", "ps_hit_wood", "ScriptArea_Dust", false); SetEntityActive("crowbar_joint_1", false); SetLocalVarInt("Door", 1); } void Scare() { AddEntityCollideCallback("Player", "push", "Push", true, 1); AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1); } void Push(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "react_pant.snt", "push", 0, false); AddPlayerBodyForce(300000, 0, 0, false); } void Slam(string &in asParent, string &in asChild, int alState) { SetSwingDoorClosed("mansiondoor1", true, true); SetSwingDoorLocked("mansiondoor1", true, true); PlaySoundAtEntity("", "00_laugh.snt", "door_slam", 0, false); } RE: Multiple use of a void OnStart, need help D: - PutraenusAlivius - 03-17-2013 PHP Code: void OnStart() RE: Multiple use of a void OnStart, need help D: - KeysOfMyMind - 03-17-2013 (03-17-2013, 02:10 AM)JustAnotherPlayer Wrote:Gee thanks for the help, nice attitude. Maybe you might want to work on that BEFORE you post on the forums. RE: Multiple use of a void OnStart, need help D: - CarnivorousJelly - 03-18-2013 (03-17-2013, 08:51 PM)KeysOfMyMind Wrote: Gee thanks for the help, nice attitude. He did just help you... (although what he said was rather rude, too). People on here can be a little bit touchy about answering the same question twice (or just sending you to the wiki page). Try these links for help before you post your questions about scripting on the forum: Beginner's Scripting Guide List of Scripting Functions If those don't help, type in a keyword in the search bar on the development-support section of the forum. Chances are other people have the same questions you do. If you've tried that and you're still stuck, open up a script file from TDD in notepad++ (preferably one you know has the function you're looking for) and look at how they did it. Once you've done that, post your question on the forum And for what it's worth, you can PM me if you have any other questions (scripting or mapping). Not going to lie, I'm not a good scripter - but I understand the basic concepts of it and I know my way around the HPL2's level editor decently. RE: Multiple use of a void OnStart, need help D: - KeysOfMyMind - 03-18-2013 (03-18-2013, 05:33 AM)Kiandra Wrote:(03-17-2013, 08:51 PM)KeysOfMyMind Wrote: Gee thanks for the help, nice attitude. Thanks I do appreciate the help he gave me but the way in which he conveyed his malcontent was rude, so I had to say something about it. So don't take that post as me not being thankful for his help. I just don't like people who are overly snarky. If you have a problem with something I do or say, then you may voice that concern in a polite manner. RE: Multiple use of a void OnStart, need help D: - PutraenusAlivius - 03-18-2013 (03-18-2013, 01:58 PM)KeysOfMyMind Wrote:I'm deeply sorry for giving you the wrong impression but, you need to learn about scripting more, okay?(03-18-2013, 05:33 AM)Kiandra Wrote:(03-17-2013, 08:51 PM)KeysOfMyMind Wrote: Gee thanks for the help, nice attitude. RE: Multiple use of a void OnStart, need help D: - Adrianis - 03-18-2013 (03-18-2013, 03:27 PM)JustAnotherPlayer Wrote: I'm deeply sorry for giving you the wrong impression but, you need to learn about scripting more, okay? So do you. So do I, and Kiandra, and everyone. We avoid being rude about it, however. RE: Multiple use of a void OnStart, need help D: - KeysOfMyMind - 03-18-2013 (03-18-2013, 03:48 PM)Adrianis Wrote:(03-18-2013, 03:27 PM)JustAnotherPlayer Wrote: I'm deeply sorry for giving you the wrong impression but, you need to learn about scripting more, okay? I know my knowledge is basic and if I had the further knowledge this wouldn't even have been a problem, thus I wouldn't have posted it here. |