Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
RE: Extra_english.lang file aint working
Interact callback is when Parent (Player in this case) interacts (with your mouse) with the Child (door_open_hall_key. Its the door itself, right?)
If you want player to trigger it entering an area, use collidecallback. Just create the script area and name it, then place it at the string& asChildName
like in your case:
AddEntityCollideCallback("Player", "name of the area ", "Doorslam1", true, 1);
05-25-2011, 05:28 PM
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
RE: Extra_english.lang file aint working
It still doesn't work
Here's my script
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "door_open_hall_key", "Doorslam1", true, 1);
}
void Doorslam1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_to_hall_key", true, true);
StartPlayerLookAt("door_to_hall_key", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}
Void stoplook(strin &in asTimer)
{
StopPlayerLookAt();
}
And here's my entity names etc in hpl2 editor.
Dubstep <3
(This post was last modified: 05-25-2011, 06:05 PM by xtron .)
05-25-2011, 06:03 PM
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
RE: Extra_english.lang file aint working
(strin &in asTimer) to (string &in asTimer)
and
Void to void
and you can drop this:
ENTITY
[X] CastShadows
CallbackFunc: -->door_to_hall_key<--
OpenAmount: 1
unless you plan to use it
(This post was last modified: 05-25-2011, 06:22 PM by Khyrpa .)
05-25-2011, 06:15 PM
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
RE: Extra_english.lang file aint working
(05-25-2011, 06:15 PM) Khyrpa Wrote: I think ill try and re-create the whole script for you. Just to be sure wtf and not to mislead you further :S
Great! Thank you man!
EDIT: Wtf, Still doesn't work...
Should i upload my .map file so you can take a look at the door and script?
Dubstep <3
(This post was last modified: 05-25-2011, 06:29 PM by xtron .)
05-25-2011, 06:16 PM
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
RE: Extra_english.lang file aint working
Damn btw. I got confused by all those: Hall_to_Key_something
I think I guided wrong or smthing :p
05-25-2011, 06:26 PM
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
RE: Extra_english.lang file aint working
(05-25-2011, 06:26 PM) Khyrpa Wrote: Damn btw. I got confused by all those: Hall_to_Key_something
I think I guided wrong or smthing :p
door name: door_to_hall_key
scriptname: door_open_hall_key
Dunno why I picked the "door_
open _hall_key" but yea ;D
Dubstep <3
05-25-2011, 06:33 PM
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
RE: Extra_english.lang file aint working
but did you get it working?
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "door_open_hall_key", "Doorslam1", true, 1);
}
void Doorslam1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_to_hall_key", true, true);
StartPlayerLookAt("door_to_hall_key", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}
void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}
I suggest you rename the damn area to: door_hall_key_
area
(This post was last modified: 05-25-2011, 06:37 PM by Khyrpa .)
05-25-2011, 06:36 PM
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
RE: Extra_english.lang file aint working
Doesn't work.
Dubstep <3
05-25-2011, 06:39 PM
Khyrpa
Senior Member
Posts: 638
Threads: 10
Joined: Apr 2011
Reputation:
24
RE: Extra_english.lang file aint working
what the hell.. it worked fine with me! I used the same names and all... What error does it say? Is the door blocked? does the LookAt start?
05-25-2011, 06:42 PM
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
RE: Extra_english.lang file aint working
Nothing happens. I just walk through the script area. It doesn't even start the lookat function.
Dubstep <3
05-25-2011, 06:47 PM