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
Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)
Zaffre Away
Posting Freak

Posts: 867
Threads: 50
Joined: Jul 2012
Reputation: 30
#11
RE: Problem with "extra_english.lang"

Okay. This is how your .hps file should look. We'll presume your door's ID is mansion_1.

void OnStart()
{
SetEntityPlayerInteractCallback("mansion_1", "DoorLockedMessage", true);
}

void DoorLockedMessage(string &in entity)
{
SetMessage("Messages", "lockeddoor", 0);
}

This makes it so that when you interact with the swing door, it will display a message stating that the door is locked. The message will not be displayed again.

As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details.
09-03-2012, 04:20 PM
Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#12
RE: Problem with "extra_english.lang"

Sigh, I've tried all your advice and more and it still doesn't work! I'm so disappointed with myself, I feel like I'm letting you all down. I think we'll try one more time and if it doesn't work that's okay, you all have done enough already.

I'm going to give you all the info, hopefully someone will find the problem.

Name of Door: roomone
Active: Yes
CastShadows:Yes
StaticPhysics:No
IsAffectedbyDecal:No

PlayerInteractCallback: DoorLockedPlayer

PlayerInteractCallBackAutoRemove: Yes
Locked: Yes

OpenAmount: 0


extra_english.lang:



<LANGUAGE>
<CATEGORY Name="Messages">
<Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry>
</CATEGORY>
</LANGUAGE>

hps file:



void OnStart()
{
SetEntityPlayerInteractCallback("roomone", "DoorLockedPlayer", true);
}

void DoorLockedMessage(string &in entity)
{
SetMessage("Messages", "lockeddoor", 0);
}


note: There is one other thing in english_Lang, a code for a note message, which works fine.

There is nothing else in hps other than the door code.

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




09-03-2012, 11:05 PM
Find
Zaffre Away
Posting Freak

Posts: 867
Threads: 50
Joined: Jul 2012
Reputation: 30
#13
RE: Problem with "extra_english.lang"

I can't find anything; it should be working fine. Sorry I couldn't help you.

As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details.
09-03-2012, 11:11 PM
Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#14
RE: Problem with "extra_english.lang"

That's okay, thanks.

If anyone knows the reason this hasn't been working please help.

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




(This post was last modified: 09-04-2012, 02:55 AM by Frodos.)
09-03-2012, 11:13 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#15
RE: Problem with "extra_english.lang"

(09-03-2012, 11:05 PM)Frodos Wrote: void OnStart()
{
SetEntityPlayerInteractCallback("roomone", "DoorLockedPlayer", true);
}

void DoorLockedMessage(string &in entity)
{
SetMessage("Messages", "lockeddoor", 0);
}
How about the bold words? Wink You function and the function you call has to be the same. You cannot call DoorLockedPlayer, and then change the name to DoorLockedMessage.

Do i get cookie? Tongue

Trying is the first step to success.
(This post was last modified: 09-04-2012, 03:54 PM by FlawlessHappiness.)
09-04-2012, 07:13 AM
Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#16
RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)

It didn't work Beecake, sorry, you'll still get a cookie though.

Still looking for an answer.

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




09-04-2012, 11:31 PM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#17
RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)

void OnStart();
{
SetEntityCallbackFunc("roomone", "DoorLockedMessage");

}




void DoorLockedMessage(string &in asItem, string &in asEntity)
{
SetMessage("Messages", "lockeddoor", 0);
}

------------
Try dat
09-04-2012, 11:41 PM
Find
Frodos Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2012
Reputation: 0
#18
RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)

(09-04-2012, 11:41 PM)Harthex Wrote: void OnStart();
{
SetEntityCallbackFunc("roomone", "DoorLockedMessage");

}




void DoorLockedMessage(string &in asItem, string &in asEntity)
{
SetMessage("Messages", "lockeddoor", 0);
}

------------
Try dat
Okay I tried that and got a fatal error.

FATAL ERROR: Could not load script file 'custom stories/Nightmare of a Child/maps/ch01/childnightmare.hps'! main (2,1) : ERR : Unexpected token '{'

Veteran Writer

Need help with your CS plot? PM me!

Noob Scripter, need help PM me.




09-05-2012, 12:15 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#19
RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)

Here's the whole setup:

Name of Door: roomone
Active: Yes
CastShadows:Yes
StaticPhysics:No
IsAffectedbyDecal:No
PlayerInteractCallback: DoorLockedMessage
PlayerInteractCallBackAutoRemove: Yes
Locked: Yes
OpenAmount: 0


extra_english.lang

<LANGUAGE>

<CATEGORY Name="Messages">
<Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry>
</CATEGORY>

</LANGUAGE>



HPS:

void OnStart()
{
//NOTHING. The callback is already set on the door in the level editor
}

void DoorLockedMessage(string &in asEntity)
{
SetMessage("Messages", "lockeddoor", 0);
}
(This post was last modified: 09-05-2012, 12:28 AM by Statyk.)
09-05-2012, 12:17 AM
Find
Kazakarumariou Away
An angry man.

Posts: 283
Threads: 8
Joined: Jul 2012
Reputation: 14
#20
RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie)

(09-05-2012, 12:15 AM)Frodos Wrote:
(09-04-2012, 11:41 PM)Harthex Wrote: void OnStart();
{
SetEntityCallbackFunc("roomone", "DoorLockedMessage");

}




void DoorLockedMessage(string &in asItem, string &in asEntity)
{
SetMessage("Messages", "lockeddoor", 0);
}

------------
Try dat
Okay I tried that and got a fatal error.

FATAL ERROR: Could not load script file 'custom stories/Nightmare of a Child/maps/ch01/childnightmare.hps'! main (2,1) : ERR : Unexpected token '{'
void OnStart()

Oops I added ; at the end of onstartlol
09-05-2012, 12:48 AM
Find




Users browsing this thread: 1 Guest(s)