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
HasItem scripting help
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#14
RE: HasItem scripting help

Script

Spoiler below!

void OnStart()
{
//QUEST//
AddEntityCollideCallback("Player", "searchHome_Quest_Area", "GetSearchHome", true, 1);
//VOICEQUEST//
AddEntityCollideCallback("Player", "voiceSearchHome_Area", "PlaySearchHome", true, 1);
AddEntityCollideCallback("Player", "voiceBathroom_Area", "PlayBathroomNo", true, 1);
AddEntityCollideCallback("Player", "voiceGuestroom_Area", "PlayGuestroomMaybe", true, 1);
AddEntityCollideCallback("Player", "voiceCheck_Area", "PlayVoiceCheck", true, 1);
//CHECK//
AddEntityCollideCallback("Player", "voiceCheck_Area", "NoLeave", false, 1);

}



//SEARCH HOME QUEST//
void GetSearchHome(string &in asParent, string &in asChild, int alState)
{
AddQuest("searchhome", "searchHomeQuest");
}


//PLAY THOUGHTS//
void PlaySearchHome(string &in asParent, string &in asChild, int alstate)
{
AddEffectVoice("iah_katethought_searchhome.ogg", "", "Dialogue", "KateThought_SearchHome", false, "", 1, 1);
}

void PlayBathroomNo(string &in asParent, string &in asChild, int alstate)
{
AddEffectVoice("iah_katethought_bathroomno.ogg", "", "Dialogue", "KateThought_BathroomNo", false, "", 1, 1);
}

void PlayGuestroomMaybe(string &in asParent, string &in asChild, int alstate)
{
AddEffectVoice("iah_katethought_guestroommaybe.ogg", "", "Dialogue", "KateThought_GuestroomMaybe", false, "", 1, 1);
}

void PlayVoiceCheck(string &in asParent, string &in asChild, int alstate)
{
AddEffectVoice("iah_katethought_voicecheck.ogg", "", "Dialogue", "KateThought_VoiceCheck", false, "", 1, 1);
}


//CHECK AND BLOCK//
void NoLeave(string &in asParent, string &in asChild, int alState)
{

if(HasItem("SpecialKey") == false)
{
SetMessage("Dialogue", "KateThought_VoiceCheck", 5);
}

if(HasItem("SpecialKey") == true)
{
SetLevelDoorLocked("twoHospital", false);
}

}


01-30-2014, 06:02 PM
Find


Messages In This Thread
HasItem scripting help - by MsHannerBananer - 01-29-2014, 09:56 AM
RE: HasItem scripting help - by PutraenusAlivius - 01-29-2014, 10:00 AM
RE: HasItem scripting help - by Daemian - 01-29-2014, 05:03 PM
RE: HasItem scripting help - by i3670 - 01-29-2014, 06:24 PM
RE: HasItem scripting help - by MsHannerBananer - 01-29-2014, 10:01 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-29-2014, 10:06 PM
RE: HasItem scripting help - by MsHannerBananer - 01-29-2014, 10:12 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-29-2014, 10:18 PM
RE: HasItem scripting help - by MsHannerBananer - 01-29-2014, 10:42 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 07:14 AM
RE: HasItem scripting help - by MsHannerBananer - 01-30-2014, 07:27 AM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 09:04 AM
RE: HasItem scripting help - by Daemian - 01-30-2014, 05:17 PM
RE: HasItem scripting help - by MsHannerBananer - 01-30-2014, 06:02 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 09:28 PM
RE: HasItem scripting help - by MsHannerBananer - 01-30-2014, 09:36 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 10:23 PM



Users browsing this thread: 1 Guest(s)