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
Skip Intro when in debug / developer mode? (Solved)
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#1
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
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}


I don't understand how this code works
Spoiler below!

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.)
03-25-2011, 10:38 AM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: Skip Intro when in debug / developer mode?

He copied that from me. Wink
Remove the fifth line
wakeUp();

(This post was last modified: 03-25-2011, 12:34 PM by Pandemoneus.)
03-25-2011, 12:33 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#3
RE: Skip Intro when in debug / developer mode?

Will it still play on a normal profile then?
03-25-2011, 12:39 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#4
RE: Skip Intro when in debug / developer mode?

Try it? Wink
You got it two times, that's why it plays all the time even when you are in debug mode..
And of course it will only play when other players are not using debug mode either, that's why I would remove the if part when you release your custom story.

(This post was last modified: 03-25-2011, 12:41 PM by Pandemoneus.)
03-25-2011, 12:40 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#5
RE: Skip Intro when in debug / developer mode?

Tried it and it works the way I want to!

Thank you very much! Smile
03-25-2011, 12:41 PM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#6
RE: Skip Intro when in debug / developer mode? (Solved)

Awesome Big Grin
(This post was last modified: 03-25-2011, 01:04 PM by Tesseract.)
03-25-2011, 12:46 PM
Find




Users browsing this thread: 1 Guest(s)