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
Going to the next map
Seneth Offline
Junior Member

Posts: 26
Threads: 9
Joined: Apr 2015
Reputation: 0
#1
Going to the next map

I have big problem. I can't go to another map with this scriptSad
Can you help me?
Map_ChangeMap("02_Generators.hpm", "PlayerStartArea_1", "", "", "");
Map_ChangeMap("02_Generators.hpm", "PlayerStartArea_1", "", "");
10-20-2015, 01:29 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#2
RE: Going to the next map

The function is the way it should be, the problem is not with it, but either another part of your script or something external. Try pasting us the entirety of your script.
10-20-2015, 01:50 PM
Find
Seneth Offline
Junior Member

Posts: 26
Threads: 9
Joined: Apr 2015
Reputation: 0
#3
RE: Going to the next map

(10-20-2015, 01:50 PM)WALP Wrote: The function is the way it should be, the problem is not with it, but either another part of your script or something external. Try pasting us the entirety of your script.
ll my scripts work good but this changemap no Big Grin
I try one change and then second, and in this script i use both without effect...
Everything work (fade,Imagetrail, but not changemap Sad
--------------------------------
///END OF THE MAP
bool EndOfTheMap(const tString &in asParent, const tString &in asChild, int alState)
{
Entity_SetActive("TriggerArea_10",false);
Effect_Fade_Out(2.0f);
Effect_ImageTrail_FadeOut(1,10.0f);
Map_AddTimer("",3.0f,"EndMapTimer");
return true;
}
void EndMapTimer(const tString &in asTimer)
{
Map_ChangeMap("02_Generators.hpm", "PlayerStartArea_1", "", "");
}
(This post was last modified: 10-20-2015, 02:19 PM by Seneth.)
10-20-2015, 02:18 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Going to the next map

Add a debug message inside your timer to check if the line is ever ran.

(This post was last modified: 10-20-2015, 02:22 PM by Mudbill.)
10-20-2015, 02:22 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: Going to the next map

I assume you only typed the changemap twice, to show you tried both versions of the fucntion, because you definitely should only use one.

If Fade_Out and image trail are running that indicates bool EndOfTheMap works, but we have no indication that EndMapTimer works, which I am guessing is the problem. This function is being called by a timer, which has not been given a name, and I think one might be required.

Maybe try this:

PHP Code: (Select All)
bool EndOfTheMap(const tString &in asParent, const tString &in asChildint alState)
{
Effect_Fade_Out(2.0f); 
Effect_ImageTrail_FadeOut(1,10.0f);
Map_AddTimer("EndMapTimer",3.0f,"EndMapTimerFunc");    
return 
false;
}
void EndMapTimerFunc(const tString &in asTimer)
{
cLux_AddDebugMessage("changing map");
Map_ChangeMap("02_Generators.hpm""PlayerStartArea_1""""");    


I also just changed it to return false, so the function only calls once, and you dont need to disable the trigger area manually.
(This post was last modified: 10-20-2015, 02:28 PM by WALP.)
10-20-2015, 02:27 PM
Find




Users browsing this thread: 1 Guest(s)