Frictional Games Forum (read-only)
Player falls - 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: Player falls (/thread-8588.html)

Pages: 1 2


RE: Player falls - Janni1234 - 06-14-2011

(06-14-2011, 12:46 PM)Russ Money Wrote: For the "lying on the floor" effect, use this function:

FadePlayerRollTo(50, 150, 150);

Then to return the camera back to horizontal

FadePlayerRollTo(0, 33, 33);

Insert those where they need to be in Janni1234's script.


Okay.Thanks.


RE: Player falls - Russ Money - 06-14-2011

(06-14-2011, 01:26 PM)Janni1234 Wrote: Okay.Thanks.

No prob bob.


RE: Player falls - miguli - 06-14-2011

Not working, and i dont know where put those:
FadePlayerRollTo(50, 150, 150);
FadePlayerRollTo(0, 33, 33);

Error comes and says:

FATAL ERROR: Could not load script file 'custosm_stories/plah/plah/plah/plaah/castleway.hps'! main(53,1) : ERR : No matching signatures to 'SetPlayerStateToNormal()'

Script:

Quote:void OnStart()
{
AddUseItemCallback("", "key_1", "door_locked_1", "UsedKeyOnDoor", true);
SetEntityPlayerInteractCallback("key_1", "Func03", true);
AddEntityCollideCallback("Player", "yourarea", "yourarea", true, 1);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_locked_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_locked_1", 0, false);
RemoveItem("key_1");
}

void Func03(string &in asEntity)
{
SetEntityActive("grunt_2", true);
AddEnemyPatrolNode("grunt_2", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_5", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_7", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_8", 0.0f, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_9", 0.0f, "");

}

void yourarea(string &in asParent , string &in asChild , int alState)
{
SetPlayerCrouching(true);
FadeOut(2);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
AddTimer("Timer", 2.0f, "wakeup");
SetPlayerJumpDisabled(true);
SetInventoryDisabled(true);
}

void wakeup(string &in asTimer)
{
StartPlayerLookAt("ScriptArea_1", 2.0, 3.0f, "");
FadeRadialBlurTo(0.07, 0.015f);
FadeIn(2);
AddTimer("Timer", 1.0f, "begin");
}

void begin(string &in asTimer)
{
SetPlayerCrouching(false);
SetPlayerJumpDisabled(false);
SetInventoryDisabled(false);
SetPlayerStateToNormal();
FadeRadialBlurTo(0, 1);
}

// Run when leaving map
void OnLeave()
{

}



RE: Player falls - xtron - 06-14-2011

well...I guess you could try to change the SetPlayerStateToNormal(); to SetPlayerStateToNormal(false); or just delete it.


RE: Player falls - Roenlond - 06-14-2011

SetPlayerStateToNormal(); isn't a function, at least not in the wiki page. So it's probably calling a custom function and since there's nothing with that name to call, it errors out. Remove the line and you shouldn't have the error, I believe Smile


RE: Player falls - miguli - 06-14-2011

Not working.. :/
Works, but i dont know where i put that falling.
(XD i forgot save map before testing, sorry guys!!)


RE: Player falls - nemesis567 - 06-14-2011

nevermind it...


RE: Player falls - miguli - 06-15-2011

Now everything is perfect falling and everything Smile


RE: Player falls - Hardarm - 06-15-2011

If you want the player really falling i don't know because the plane isn't an entity, though. Am i wrong? i can't even disable it when i click to it on the editor.