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
Extra_english.lang file aint working
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#11
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
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#12
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.
Spoiler below!

Script area:
GENERAL
Name: door_open_hall_key
[X] Active

AREA
PlayerLookAtCallback: door_open_hall_key
[X] PlayerLookAtcallBackAutoRemo...

The door:
GENERAL
Name: door_to_hall_key
[X] Active

ENTITY
[X] CastShadows
CallbackFunc: door_to_hall_key
OpenAmount: 1

These are my settings for the scriptarea and for the door. The settings I didn't mention, I didn't change at all.


[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 05-25-2011, 06:05 PM by xtron.)
05-25-2011, 06:03 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#13
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
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#14
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 Big Grin and not to mislead you further :S

Great! Thank you man! Smile


EDIT: Wtf, Still doesn't work...

Should i upload my .map file so you can take a look at the door and script?

[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 05-25-2011, 06:29 PM by xtron.)
05-25-2011, 06:16 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#15
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
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#16
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

[Image: 44917299.jpg]Dubstep <3
05-25-2011, 06:33 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#17
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
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#18
RE: Extra_english.lang file aint working

Doesn't work.

[Image: 44917299.jpg]Dubstep <3
05-25-2011, 06:39 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#19
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
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#20
RE: Extra_english.lang file aint working

Nothing happens. I just walk through the script area. It doesn't even start the lookat function.

[Image: 44917299.jpg]Dubstep <3
05-25-2011, 06:47 PM
Find




Users browsing this thread: 2 Guest(s)