Frictional Games Forum (read-only)
Need various information - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Need various information (/thread-8241.html)

Pages: 1 2 3


RE: Need various information - KenOfAllTrades - 06-01-2011

Okay so, I need a script where the player falls down sideways and everything fades out, as if he faints. Problem is that I don't know how to do it, and I've tried using the original story's scripts for help, but I just can't understand them at all. Could you please teach me how to?

Or if you can't, but you can make the script, make the script for me?


RE: Need various information - KenOfAllTrades - 06-06-2011

Bump? I really need help


RE: Need various information - Kyle - 06-06-2011

First, it depends if he is falling down a hole or not, but lets say that.

And so once the player collides with one of the areas in the shaft in the hole, stuff happens or you could add timers to be apart of the one single collide callback instead of many of them.

Code:
void OnStart()
{
     AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);
}
Func01(string &in asParent, string &in asChild, int alState)
{
     FadePlayerRollTo(110, 2, 3);
     FadeOut(5);
     AddTimer("", 5, "Func02");
}
Func02(string &in asTimer)
{
     PlaySoundAtEntity("", "player_bodyfall.snt", "Player", 0, false);
     ChangeMap("Map02", "PlayerStartArea_1", "", "");
}

The "ChangeMap" command teleports the player to a different map. Replace "Map02" with the name of your next map. The "PlayerStartArea_1", should be the name of the spawn in the next map for it is where the player will appear at once the map changes. The last 2 blanks can be left the way they are.


RE: Need various information - KenOfAllTrades - 06-06-2011

Ah, great! Now I can finish up my map! Thank you once again, I cannot explain my grattitude