The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help SetLanternLitCallback
hunchbackproduction Offline
Junior Member

Posts: 36
Threads: 13
Joined: Jul 2013
Reputation: 0
#1
SetLanternLitCallback

void SetLanternLitCallback(string& asCallback);
Sets the function to call when the player uses his lantern.
Callback syntax: MyFunc(bool abLit)

I am using this code in my custom story, however it seems to be doing nothing and I'd like to think I didn't make an error in code. Any help would be appreciated!!! <3 Big Grin


void LanternTinderCheck(string& asCallback)
{
if (GetGlobalVarInt("Tinderboxes") == 0)
{
SetMessage("Chemical", "notinderboxes", 1);
SetLanternActive(false, true);
SetLanternDisabled(true);
AddTimer("", 1, "ReAllowLighting");
}
if (GetGlobalVarInt("Tinderboxes") > 0)
{
AddGlobalVarInt("Tinderboxes", -1);
SetMessage("Chemical", "lanternlit", 1);
SetLanternLitCallback("LanternTinderCheck");
}
}

void ReAllowLighting(string &in asTimer)
{
SetLanternDisabled(false);
SetLanternLitCallback("LanternTinderCheck");
}

void OnStart()
{
SetLanternLitCallback("LanternTinderCheck");
SetGlobalVarInt("Tinderboxes", 0);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "ArthurCheck", true, 1);
PlayMusic("RopeFootstep.ogg", true, 1, 1, 1, false);
}

void OnLeave()
{
SetupLoadScreen("LoadingText", "Loading", 7, "HNBKChapterOne.jpg");
}

Scripting level is over 9000!
(This post was last modified: 07-19-2013, 06:59 PM by hunchbackproduction.)
07-19-2013, 05:32 PM
Website Find


Messages In This Thread
SetLanternLitCallback - by hunchbackproduction - 07-19-2013, 05:32 PM
RE: SetLanternLitCallback - by Your Computer - 07-19-2013, 09:20 PM
RE: SetLanternLitCallback - by Tomato Cat - 07-20-2013, 01:02 PM
RE: SetLanternLitCallback - by Tomato Cat - 07-20-2013, 02:58 PM
RE: SetLanternLitCallback - by Tomato Cat - 07-29-2013, 07:37 PM
RE: SetLanternLitCallback - by SilentStriker - 08-03-2013, 09:31 PM
RE: SetLanternLitCallback - by Your Computer - 08-04-2013, 09:42 AM
RE: SetLanternLitCallback - by SilentStriker - 08-04-2013, 10:44 AM
RE: SetLanternLitCallback - by Tomato Cat - 08-04-2013, 01:33 AM
RE: SetLanternLitCallback - by PutraenusAlivius - 08-04-2013, 02:12 AM
RE: SetLanternLitCallback - by Tomato Cat - 08-04-2013, 03:06 AM
RE: SetLanternLitCallback - by PutraenusAlivius - 08-04-2013, 03:28 AM
RE: SetLanternLitCallback - by Tomato Cat - 08-04-2013, 03:34 AM



Users browsing this thread: 1 Guest(s)