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 Can't progress without picking up note+key Script?
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#6
RE: Can't progress without picking up note+key Script?

It'll be much easier to just use one area and with some if-else statements.
PHP Code: (Select All)
void OnStart()
{
SetEntityCallbackFunc("InsertNoteName""PickUpNote");
SetEntityCallbackFunc("InsertKeyName""PickUpKey");
AddEntityCollideCallback("Player""InsertScriptAreaName""AreaCollideMsg"true1);
}

void PickUpNote(string &in asEntitystring &in type)
{
SetLocalVarInt("Note"1);
}

void PickUpKey(string &in asEntitystring &in type)
{
SetLocalVarInt("Key"1);
}

void AreaCollideMsg(string &in asParentstring &in asChildint alState)
{
if(
GetLocalVarInt("Note") == 0)
{
SetMessage("MessageCategory""MessageEntry"0);
//This should be the message if the Player haven't picked up the note and the key.
StartPlayerLookAt("NoteName"515"");
StopPlayerLookAt();
}

else if(
GetLocalVarInt("Note") == && !GetLocalVarInt("Key") == 1)
{
SetMessage("MessageCategory""MessageEntry"0);
//This should be the message if the Player picked up the note, but not the key.
StartPlayerLookAt("KeyName"515"");
StopPlayerLookAt();
}

else if(
GetLocalVarInt("Note") == && GetLocalVarInt("Key") == 1)
{
}

I'm not that sure that this will work or not. I just quickly did this.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 02-05-2014, 03:29 AM by PutraenusAlivius.)
02-05-2014, 03:29 AM
Find


Messages In This Thread
RE: Can't progress without picking up note+key Script? - by PutraenusAlivius - 02-05-2014, 03:29 AM



Users browsing this thread: 2 Guest(s)