Frictional Games Forum (read-only)
[SCRIPT] Switching Levels through colliders - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Switching Levels through colliders (/thread-13479.html)



Switching Levels through colliders - A.I. - 02-21-2012

I have been trying to figure this out but I am trying to make a collider that loads another level so far the only thing I know is void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);. But I need to figure out how can be triggered by the collider.


RE: Switching Levels through colliders - flamez3 - 02-21-2012

If by "collider" you mean a ScriptArea.

void OnStart()
{
AddEntityCollideCallback("Player", "nameofscriptarea", "changemap", true, 1);
}

void changemap(string &in asParent, string &in asChild, int alState)
{
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
}


RE: Switching Levels through colliders - A.I. - 02-21-2012

Ohh, I understand.......things will get easier later on, anyways thanks