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 What if player leaves level without lantern?
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: What if player leaves level without lantern?

Make an area at some point (just befor the door or something) and and put the leveldoor or swingdoor at locked and so when the player touches the area you activate (unlock with swingdoor) the unactive leveldoor that does teleport you to the next map. if you know what I mean. use this script you do have to fill in some names though but I'll highlighted them.
Spoiler below!

OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "haslantern", true, 1);
}
void haslantern(string &in asParent, string &in asChild, int alState)
{
if(HasItem("Lantern"))
{
SetEntityActive("THEOPENABLEDOORNAME", true);
SetEntityActive("THENOTWORKINGDOOR", false);
}
}

all you have to do further is to put a message on the not opanable door that says something like"I think I should take the lantern with me" if you have any questions be sure to ask Big Grin

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
11-12-2012, 04:54 PM
Find


Messages In This Thread
RE: What if player leaves level without lantern? - by Steve - 11-12-2012, 04:54 PM



Users browsing this thread: 3 Guest(s)