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?
jamistara Offline
Junior Member

Posts: 21
Threads: 7
Joined: Nov 2012
Reputation: 0
#3
RE: What if player leaves level without lantern?

(11-12-2012, 04:54 PM)Steve Wrote: 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
Its fine, but if i try the door before taking lantern, i will not open Thats Good!!! But when i take lantern after that, the door will not open anymore. My english is not good, but hope you understand, tell me if you not Big Grin

(11-12-2012, 05:35 PM)jamistara Wrote:
(11-12-2012, 04:54 PM)Steve Wrote: 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
Its fine, but if i try the door before taking lantern, i will not open Thats Good!!! But when i take lantern after that, the door will not open anymore. My english is not good, but hope you understand, tell me if you not Big Grin
I meant IT will not open Big Grin
(This post was last modified: 11-12-2012, 05:36 PM by jamistara.)
11-12-2012, 05:35 PM
Find


Messages In This Thread
RE: What if player leaves level without lantern? - by jamistara - 11-12-2012, 05:35 PM



Users browsing this thread: 1 Guest(s)