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) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change map with area...
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#1
Change map with area...

So, I want the player to walk into an area and it's supposed to change level. I'm pretty sure this is possible since the creator of 'Killings in Alstadt' did this. Amnesia doesn't crash and I don't get an error message, but I know I'm not doing anything wrong. This is the part of the script:

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""ChangeLevel_1""LeaveMap_1"true1);
}

void LeaveMap_1(string &in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("""player_bodyfall.snt""Player"0.1ffalse);
FadeOut(2.0f);
ChangeMap("InsideCabin.map""PlayerStartArea_2""""");
}

void OnLeave()
{
SetupLoadScreen("LoadingText""load_1"1"game_loading_well.jpg");


edit for no bump: I had named the ScriptArea in the level editor and the script differently
Spoiler below!

[Image: picard-facepalm.jpg?1240934151]

(This post was last modified: 03-29-2013, 12:32 PM by Tiger.)
03-09-2013, 12:43 AM
Find


Messages In This Thread
Change map with area... - by Tiger - 03-09-2013, 12:43 AM
RE: Change map with area... - by i3670 - 03-09-2013, 01:27 AM
RE: Change map with area... - by 7heDubz - 03-09-2013, 01:38 AM
RE: Change map with area... - by Tiger - 03-09-2013, 01:38 AM
RE: Change map with area... - by NaxEla - 03-09-2013, 03:46 AM
RE: Change map with area... - by 7heDubz - 03-09-2013, 04:23 AM
RE: Change map with area... - by Tiger - 03-09-2013, 11:27 AM
RE: Change map with area... - by Your Computer - 03-09-2013, 11:56 AM
RE: Change map with area... - by Tiger - 03-10-2013, 10:26 AM
RE: Change map with area... - by No Author - 03-10-2013, 11:14 AM
RE: Change map with area... - by Tiger - 03-10-2013, 10:00 PM
RE: Change map with area... - by PutraenusAlivius - 03-11-2013, 08:13 AM
RE: Change map with area... - by The chaser - 03-10-2013, 12:32 PM
RE: Change map with area... - by No Author - 03-11-2013, 07:56 AM
RE: Change map with area... - by richm0nkey - 03-11-2013, 09:59 AM
RE: Change map with area... - by PutraenusAlivius - 03-11-2013, 10:02 AM
RE: Change map with area... - by Adrianis - 03-13-2013, 01:24 PM



Users browsing this thread: 1 Guest(s)