Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Should be an easy fix
Author Message
Cole Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #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 all posts by this user Quote this message in a reply
Cole Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #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 all posts by this user Quote this message in a reply
Cole Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)