new to scripting thing - 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: new to scripting thing (/thread-7787.html) |
new to scripting thing - eRoTic - 05-03-2011 ya i kno kinda how to do it and stuffs but O.o if i have a script Em... Like BedRoom.hps then i have the func so the key opens the door and then removes but how do i add more funcz in the scrpit? like if i want a lever to work:o? i know the script like thing or whatever but like do you have to put like / between them or somthing? O.o / was just an example somthing like err.. i use this func o.o Code: void OnStart() Code: void OnLeverStateChange(string &in EntityName, int alState) RE: new to scripting thing - Roenlond - 05-03-2011 You will need to add a callback of some sort in the OnStart() area. Be it player collide, interact, look, etc. The order and such doesn't matter, but it is generally easier for everybody if you got a decently sorted script. Just be sure to keep this format: void FunctionNameThatCanBeAnything(syntax) { DoStuff(); } Remember the {}'s, the first one marks the start of the function while the second one ends it. |