Frictional Games Forum (read-only)
i just dont get it...? - 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: i just dont get it...? (/thread-6578.html)



i just dont get it...? - zatrix - 02-13-2011

Hey guys, im pretty new to all this Smile
but ive made up a map and want to test it.. but i really dont know HOW to test it?

i mean i does not show ingame under " Costum story's "
what do i need to do so i can play my own map ? Smile


-zatrix


RE: i just dont get it...? - Tanshaydar - 02-13-2011

http://wiki.frictionalgames.com/hpl2/start


RE: i just dont get it...? - zatrix - 02-13-2011

(02-13-2011, 09:06 PM)Tanshaydar Wrote: http://wiki.frictionalgames.com/hpl2/start


i have tryed that site, but i still dont understand it, i confuse's me even more -.-'

sorry for this hehe but im totaly new to all this stuff Confused


RE: i just dont get it...? - Crunchygoblin - 02-13-2011

Here's an example script. What it does is when you walk into a script box named "area1" it will set a skull to active or visible and give sanity damage.

Now for the break down.

Under the void Onstart is where you is the line of code that basically says, When the "Player" (this can also being an object or enemy) collides with the script box called "area1" Goto "skullactive". You can name the area1 or skullactive whatever you want. Next at the top is the script you told it to go to. The name of the void can be whatever you want it to be, as long as its the same as the line under the Void OnStart. So after tell the script where to go when you collide with the box, it simply tells the skull to go from being unactive to active. (this script applies to anything you can set to active or unactive in the editor. Then it give you some sanity damage.




void skullactive(string &in asItem, string &in asEntity)
{
SetEntityActive("human_skull_2" , true);
GiveSanityDamage(10,true);

}



void OnStart()
{
AddEntityCollideCallback("Player", "area1", "skullactive", true, 1);
}