Frictional Games Forum (read-only)

Full Version: i just dont get it...?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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
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);
}