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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Fainting into a new map [Need scripting help]
Aletho Offline
Junior Member

Posts: 14
Threads: 4
Joined: Jan 2015
Reputation: 0
#1
[SOLVED] Fainting into a new map [Need scripting help]

Hey guys!

I'm not really that experienced in the scripting from scratch part of custom story making, so I was hoping someone here would know how to solve my problem. In my custom story, the player is supposed to walk to a scripting area where he will start to faint, the screen will go black and then he should wake up in a new map which features the same room but now in a much darker environment.
Hope you know how to help me out! :-)

EDIT:
I have already tried this:
void OnStart ()
{
AddEntityCollideCallback("Player", "Trigger_1", "Faint", true, 1);
}

void Faint(string &in asParent, string &in as Child, int alState)
{
FadePlayerRollTo(50, 220, 220); //Rolls your head to the side
SetPlayerCrouching(true); //Makes the falling down more realistic
FadeOut(5.0f); //This means it will take 5 seconds to fade to black
ChangeMap("00_Awakened", "PlayerStartArea_1", "", "",); //Changes the map
}

but the ChangeMap line creates scripterrors which keeps me from loading the custom story.
Thanks in advance,
Alex
(This post was last modified: 01-07-2015, 02:44 PM by Aletho.)
01-07-2015, 10:05 AM
Find


Messages In This Thread
[SOLVED] Fainting into a new map [Need scripting help] - by Aletho - 01-07-2015, 10:05 AM



Users browsing this thread: 1 Guest(s)