Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does that mean?
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#4
RE: What does that mean?

(06-23-2012, 04:56 PM)FastHunteR Wrote: You need even more than that, or the door closes right when you actually enter the map. Actually, that's even the wrong command. For first, I'll point you to a site on the wiki. It has every thing you need:
http://wiki.frictionalgames.com/hpl2/amn..._functions
use ctrl + f to search for a command. search for setswingdoorclosed to see a explanation what asname, aslocked etc. means.
Now for the close behind you part:

place a script area at which point the door should close.

then, add this to OnStart():

AddEntityCollideCallback("Player", "yourscriptareanamehere", "CloseDoorFunc", true, 1);

Then, add this anywhere not inside a function:

void CloseDoorFunc(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("Doornamehere", true, true);
}

Maybe you can use some sounds for the slam, and some sanity drain.
I have this:


void OnStart()
{
ShowEnemyPlayerPosition("Grunty1");
AddUseItemCallback("", "Key_1", "castle_1", "KeyOnDoor", true);
}


AddEntityCollideCallback("Player", "ScriptArea_1", "CloseDoorFunc", true, 1);
void CloseDoorFunc(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("castle_1", true, true);
}


void KeyOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_1", 0, false);
RemoveItem("Key_1");
}

void OnEnter()
{

}

void OnLeave()
{







}

And it is giving me an error :S help please????

Special Custom Story for 2 special people!

[Image: LWFcAl]


06-23-2012, 05:12 PM
Find


Messages In This Thread
What does that mean? - by Jagsrs28 - 06-23-2012, 04:02 PM
RE: What does that mean? - by Wrathborn771 - 06-23-2012, 04:47 PM
RE: What does that mean? - by Cruzore - 06-23-2012, 04:56 PM
RE: What does that mean? - by Jagsrs28 - 06-23-2012, 05:12 PM
RE: What does that mean? - by Cruzore - 06-23-2012, 05:15 PM
RE: What does that mean? - by Jagsrs28 - 06-23-2012, 06:46 PM
RE: What does that mean? - by Unearthlybrutal - 06-23-2012, 06:50 PM
RE: What does that mean? - by Cruzore - 06-23-2012, 07:26 PM
RE: What does that mean? - by Adny - 06-23-2012, 08:36 PM
RE: What does that mean? - by MaZiCUT - 06-23-2012, 08:37 PM
RE: What does that mean? - by Cruzore - 06-23-2012, 08:39 PM



Users browsing this thread: 1 Guest(s)