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)
Skip Intro when in debug / developer mode? (Solved)
Hi! I'm creating my own map, and I want my intro (where the player wakes up) only to play when the map is ran on a normal profile. So when I load the map on the developer profile I want the intro to be skipped. I've been checking the scripts for some other maps and seems like some developers do this, I tried copying / pasting that part of the script but it doesn't work for me.
By the way, I copied the script from the custom story "Black Forest Castle" by "theDARKW0LF"
So here's how my script looks..
Spoiler below!
void OnStart()
{
if(!ScriptDebugOn()) wakeUp(); //no intro when you are testing
else AddDebugMessage("Skipping Intro", false);
wakeUp();
SetPlayerLampOil(20);
AddQuest("Lantern", "Lantern");
AddEntityCollideCallback("Player", "CollideKnightHeadTrigger1", "CollideKnightHeadTrigger1", true, 0);
}
void wakeUp () {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 200, 200); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
if(!ScriptDebugOn()) wakeUp(); //no intro when you are testing
else AddDebugMessage("Skipping Intro", false);
but it seemed to work on the Black Forest Castle map. (Also the wakeUp(); part was called Intro(); on the Black Forest Castle map I believe, I renamed it as I assume it shall be the name of my intro there..)
If anyone could be please tell me how I can skip the intro in developer mode I would appreciate it very much. And I am also a newbie at scripting, I know so please don't leave unnecessary replies, thanks.
(This post was last modified: 03-25-2011, 12:41 PM by Shadowfied.)