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
Should be an easy fix
Cole Offline
Junior Member

Posts: 7
Threads: 1
Joined: Mar 2012
Reputation: 0
#1
Should be an easy fix

Firstly I would like to say hello first time post and new to forums. Big Grin

However I got the basics down for map making(its similar to java coding lol).

Regardless lets move on with the problem, so I have a door that I just added a message to and it says "This door needs a key to open it." Which is exactly what I wanted it to do, but the problem is it keeps saying it over and over again when I click on it.(If it helps this is a level door not a normal door).

I can show you my code if you would like thanks.
(This post was last modified: 03-29-2012, 01:42 AM by Cole.)
03-29-2012, 01:41 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: Should be an easy fix

Use an if statement to determine if the door is locked upon interaction.

03-29-2012, 02:38 AM
Find
Cole Offline
Junior Member

Posts: 7
Threads: 1
Joined: Mar 2012
Reputation: 0
#3
RE: Should be an easy fix

(03-29-2012, 02:38 AM)Obliviator27 Wrote: Use an if statement to determine if the door is locked upon interaction.

How can I use an if statement if the message is being played through extra_english.lang?

My .lang

<CATEGORY Name="Messages">
<Entry Name="MansionDoor">This door needs a key to open.</Entry>
</CATEGORY>

My .hps

void MansionDoor(string &in asEntity)
{
SetMessage("Messages", "MansionDoor", 0);
}
(This post was last modified: 03-29-2012, 10:52 PM by Cole.)
03-29-2012, 10:50 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#4
RE: Should be an easy fix

The if statement would be used in your .hps.
void MansionDoor(string &in asEntity)
{
if(GetSwingDoorLocked("DOORNAME"))
{
SetMessage"Messages", "MansionDoor", 0);
}
}
What this will do is check if the door is locked. If it is locked, it will set the message. If the door is unlocked, nothing will be displayed on-screen.

03-29-2012, 11:19 PM
Find
Cole Offline
Junior Member

Posts: 7
Threads: 1
Joined: Mar 2012
Reputation: 0
#5
RE: Should be an easy fix

Yea okay thanks a lot...just wasn't sure how to add it haha working perfectly. =]
(This post was last modified: 03-30-2012, 12:29 AM by Cole.)
03-30-2012, 12:29 AM
Find




Users browsing this thread: 1 Guest(s)