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
Script Help Normal Door 'Locked Text
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#1
Normal Door 'Locked Text

So hey everyone i know how to make a locked text on a level door...

But how does that works on a normal door....

I am using a Mansion door it needs a key to open i want a text that show up...

You need a key to enter the dinner room.

Anyone knows how to make that?

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
02-13-2013, 08:17 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Normal Door 'Locked Text

in the interaction tab (in the editor, when you click the door) write "DoorLocked".

Then in your script write this function:

void DoorLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity)
{
SetMessages("MessageCategory", "MessageEntry", 0);
}
}

Change MessageCategory and MessageEntry to whatever is in your .lang file under messages.

You can now write "DoorLocked" in every interaction tab (In swingdoors), to make it set the message if it's locked.

Trying is the first step to success.
02-13-2013, 09:24 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#3
RE: Normal Door 'Locked Text

(02-13-2013, 09:24 PM)BeeKayK Wrote: in the interaction tab (in the editor, when you click the door) write "DoorLocked".

Then in your script write this function:

void DoorLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity)
{
SetMessages("MessageCategory", "MessageEntry", 0);
}
}

Change MessageCategory and MessageEntry to whatever is in your .lang file under messages.

You can now write "DoorLocked" in every interaction tab (In swingdoors), to make it set the message if it's locked.


i got this? if im correct?

void DoorLocked(string &in asEntity)
{
if(GetSwingDoorLocked(asEntity)
{
SetMessages("Messages", "dinnerdoor", 0);
}
}

LANG:

<Entry Name="dinnerdoor">I need a key to enter the Dining Room.</Entry>

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
02-13-2013, 09:31 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Normal Door 'Locked Text

if that is your whole .LANG file then it's wrong.
But the entry and the script looks fine Smile

Though if you write it like that, it will say dinner door at every door that is locked (where you put the script).
Why not instead write "It's locked", and then give the player a quest: AddQuest (Which is a memento), that says "I need a key to enter the Dining Room."?
That would be better i think

Trying is the first step to success.
02-13-2013, 09:49 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#5
RE: Normal Door 'Locked Text

(02-13-2013, 09:49 PM)BeeKayK Wrote: if that is your whole .LANG file then it's wrong.
But the entry and the script looks fine Smile

Though if you write it like that, it will say dinner door at every door that is locked (where you put the script).
Why not instead write "It's locked", and then give the player a quest: AddQuest (Which is a memento), that says "I need a key to enter the Dining Room."?
That would be better i think

Ye but i didn't scripted for 4 months and i kinda lost all that scripting out of my head ;(

this is the hole lang.

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="Messages">
<Entry Name="SignArea_1">This is a grave....[br]Someone had died here.</Entry>
<Entry Name="SignArea_2">What another grave,[br]Im not sure what kind of family this is.[br]But it has long generations.</Entry>
<Entry Name="doormyhouse">What its locked.....[br]SHIT my key is still inside...</Entry>
<Entry Name="Message1">My neighbors a key,I gave it a long time ago.</Entry>
<Entry Name="doordungeon">I need a key to enter the Dungeon.</Entry>
<Entry Name="cryptdoor">I need a key to enter the Crypt.</Entry>
<Entry Name="dinnerdoor">I need a key to enter the Dining Room.</Entry>
<Entry Name="kitchen">Kitchen.</Entry>
</CATEGORY>
</LANGUAGE>

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
(This post was last modified: 02-13-2013, 10:06 PM by VeNoMzTeamHysterical.)
02-13-2013, 10:05 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Normal Door 'Locked Text

Then get it again! Big Grin

Trying is the first step to success.
02-13-2013, 10:06 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#7
RE: Normal Door 'Locked Text

(02-13-2013, 10:06 PM)BeeKayK Wrote: Then get it again! Big Grin

hehe i will try to Tongue

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
02-13-2013, 10:06 PM
Website Find




Users browsing this thread: 1 Guest(s)