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
Adding messages to a locked door?
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#1
Adding messages to a locked door?

Well I followed the instructions for adding messages to a locked door and it's just not working.


What I did:


Added: <CATEGORY Name=“Messages”>


<Entry Name =“msgname1”>The door seems to be locked. Maybe I should look around a little bit.</Entry>


</CATEGORY>

To my .lang file


Also added:


void DoorLockedPlayer1(string &in entity)


{
if(GetSwingDoorLocked("castle_1") == true)
{
SetMessage("Messages", "msgname1", 0);
}
}



To my .hps file
I clicked on my door in hpl2 and went to the Entity's tab
(The door was already locked) and typed in
DoorLockedPlayer1 for the player interact call back.


I am thinking it is a scripting error.
Please help me?

Special Custom Story for 2 special people!

[Image: LWFcAl]


06-25-2012, 06:24 AM
Find
Demondays1 Offline
Member

Posts: 57
Threads: 7
Joined: Jun 2012
Reputation: 0
#2
RE: Adding messages to a locked door?

Instead of getswingdoorlocked, try this:

SetSwingDoorLocked("castle_1", false, true);

and take off the extra } at the end.

Im no expert at scripting but I am trying to help.

Intel HD Lag fix: tiny.cc/pyv1gw
(This post was last modified: 06-25-2012, 06:47 AM by Demondays1.)
06-25-2012, 06:46 AM
Find
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#3
RE: Adding messages to a locked door?

(06-25-2012, 06:46 AM)Demondays1 Wrote: Instead of getswingdoorlocked, try this:

SetSwingDoorLocked("castle_1", false, true);

and take off the extra } at the end.

Im no expert at scripting but I am trying to help.
Crashed...

Special Custom Story for 2 special people!

[Image: LWFcAl]


06-25-2012, 06:50 AM
Find
Demondays1 Offline
Member

Posts: 57
Threads: 7
Joined: Jun 2012
Reputation: 0
#4
RE: Adding messages to a locked door?

(06-25-2012, 06:50 AM)Jagsrs28 Wrote:
(06-25-2012, 06:46 AM)Demondays1 Wrote: Instead of getswingdoorlocked, try this:

SetSwingDoorLocked("castle_1", false, true);

and take off the extra } at the end.

Im no expert at scripting but I am trying to help.
Crashed...
Ok add your original back and see what happens if you take off "if" also leave the } at the end deleted so you only have 1.

Intel HD Lag fix: tiny.cc/pyv1gw
06-25-2012, 06:52 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Adding messages to a locked door?

If those special quotation marks were used in the LANG file, then that's one explanation why the message didn't work.

Tutorials: From Noob to Pro
06-25-2012, 07:08 AM
Website Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#6
RE: Adding messages to a locked door?

Instead of: if(GetSwingDoorLocked("castle_1") == true)

Use: if(GetSwingDoorLocked("castle_1"))

It comes back as "true," and that's what triggers the if statement. Operations like == are only used for numbers.

(This post was last modified: 06-25-2012, 08:00 AM by Damascus.)
06-25-2012, 07:57 AM
Find




Users browsing this thread: 1 Guest(s)