![]() |
I Need Someone To Help Me With 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: I Need Someone To Help Me With Scripting! (/thread-10313.html) |
I Need Someone To Help Me With Scripting! - MiaMasonSilentHill - 09-13-2011 I am new to scripting in amnesia, I enjoy it and I have a lot of imagination so I need to know a few things about scripting in .hps. I know the basics such as, Giving Items From File and making a monster appear behind you when you pick up an item. I can't seem to get collides to work, I make the area and the item to make work, I do the scripting with collide callbacks. I don't understand what I put in the boxes on the level editor on the entity properties. Please help, I'd love to meet some like minded people on here! Yours Sincerely Mia Mason From Silent Hill RE: I Need Someone To Help Me With Scripting! - Obliviator27 - 09-13-2011 (09-13-2011, 09:55 PM)MiaMasonSilentHill Wrote: I am new to scripting in amnesia, I enjoy it and I have a lot of imagination so I need to know a few things about scripting in .hps.Collide Callbacks are probably one of the simplest things to do with HPL2. Code: void AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates); For example, if you had AddEntityCollideCallback("Player", "ScareArea", "Scare", true, 1); When Player collides with ScareArea, the callback Scare is called, and the callback removed. Since the alState (the number at the end) is 1, the callback is only called when the player enters this area. The boolean value before it, true, is a remove function. That means that the callback no longer exists once it is called. Eg) Player walks into a room, and a noise is played. If it is set to false, whenever the player enters the area, a sound is played. If it is set to true, the sound will be played once, and not be repeated. Hopefully that was clear enough. ![]() RE: I Need Someone To Help Me With Scripting! - MiaMasonSilentHill - 09-13-2011 (09-13-2011, 10:25 PM)Obliviator27 Wrote: Thanks That's A Real Help!.(09-13-2011, 09:55 PM)MiaMasonSilentHill Wrote: I am new to scripting in amnesia, I enjoy it and I have a lot of imagination so I need to know a few things about scripting in .hps.Collide Callbacks are probably one of the simplest things to do with HPL2. |