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
KeyDrop
MacKetchup Offline
Junior Member

Posts: 25
Threads: 10
Joined: Apr 2013
Reputation: 0
#1
KeyDrop

I want my Key to drop from the door frame after reading the note. But it doesn't work

I would appreciate if someone could help me

AddEntityCollideCallback("Player", "note_generic_1",
"DoorKeyFallWhenReadingNote", true);

void DoorKeyFallWhenReadingNote(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("key_study_1", true);
SetMessage("Messages", "LoL", 0);
}
04-19-2014, 03:50 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: KeyDrop

It might be that you're trying to activate the key when player has read note, am I right?

void OnStart()
{
     SetEntityCallbackFunc("note_generic_1", "DoorKeyFallWhenReadingNote");
}

void DoorKeyFallWhenReadingNote(string &in asEntity, string &in asType)
{
     SetEntityActive("key_study_1", true);
     SetMessage("Messages", "LoL", 0);
}

Derp.
(This post was last modified: 04-19-2014, 03:55 PM by Neelke.)
04-19-2014, 03:54 PM
Find
MacKetchup Offline
Junior Member

Posts: 25
Threads: 10
Joined: Apr 2013
Reputation: 0
#3
RE: KeyDrop

Yes correct

just wanted to thank you for making the key active but my message isn't showing up Tongue

SetMessage("Messages", "LoL", 0);

<CATEGORY Name="Messages">

<Entry Name ="msgname">The door is locked.</Entry>
<Entry Name ="LoL">I think i heard something by the door.</Entry>

</CATEGORY>

What can i do to fix it or is it even possible ?
(This post was last modified: 04-19-2014, 04:23 PM by MacKetchup.)
04-19-2014, 03:58 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: KeyDrop

The last number can't be 0, or else it will disappear instantly. That number represents the time the message is displayed. I recommend 3, but I think if you set it to -1, it will be displayed for a time depending on the length of the string.

04-19-2014, 07:17 PM
Find
MacKetchup Offline
Junior Member

Posts: 25
Threads: 10
Joined: Apr 2013
Reputation: 0
#5
RE: KeyDrop

Just want to thank you for the help both of you. Big Grin
04-19-2014, 08:20 PM
Find




Users browsing this thread: 1 Guest(s)