Frictional Games Forum (read-only)
Floating :P - 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: Floating :P (/thread-12878.html)

Pages: 1 2


RE: Floating :P - Elven - 01-26-2012

Nah, the black box are last option. I prefer if it slowly goes down.

(01-26-2012, 03:09 PM)Shadowfied Wrote:
(01-26-2012, 03:06 PM)palistov Wrote: Use this loop. You'll need to experiment to find the proper values yourself. Just a word of warning, if you constantly apply vertical force to the player to make them float, it may make it extremely difficult for them to move around. You may need to experiment with also drastically increasing their movement speed to compensate for this unresponsiveness. Just make sure you turn it back down when you want them to stop floating Wink
PHP Code:
float fPause =  0.0166f
void SomeRandomFXN(blahblahblah

// run function instantly, name timer same as function name 
PLAYER_FLOAT("PLAYER_FLOAT"); 

 
void PLAYER_FLOAT(string &in timer

//add player vertical body force here 
//loop it 
AddTimer(timerfPausetimer); 

I didn't know you could make a void like that..(PLAYER_FLOAT("PLAYER_FLOAT")Wink

Also what does float fPause do?
I did use that, but the effect was as I said in the beginning:

In onstart: AddEntityCollideCallback("Player", "slowmo", "slowmotion", true, 1);

void slowmotion(string &in asParent, string &in asChild, int alState)
{
AddTimer("FlyDown", 0, "FlyDown");
AddTimer("EndSlo", 1.5, "EndSlo");
}

void FlyDown(string &in asTimer)
{
AddPlayerBodyForce(0, 1700, 0.0, false);
AddTimer("FlyDown", 0, "FlyDown");
AddDebugMessage("Happens", false);
}



Dare to explain more please Smile?


RE: Floating :P - Your Computer - 01-26-2012

(01-26-2012, 09:24 PM)Statyk Wrote: But say you don't want the player to descend when going backwards. Then you know it's a "staircase" =\

Then make a block box that is a MoveObject that moves along the Y axis. Then use collision callbacks to move the box up or down.


RE: Floating :P - Elven - 01-26-2012

that is also good way Big Grin, thank you!



RE: Floating :P - Dobbydoo - 01-27-2012

Just a suggestion, but you could use multiple timers with different forces instead of just one, so that when you start going down, you get lifted up again by a stronger force, and when you go up you have a weaker force.



RE: Floating :P - Tripication - 01-27-2012

(01-27-2012, 04:06 PM)Dobbydoo Wrote: Just a suggestion, but you could use multiple timers with different forces instead of just one, so that when you start going down, you get lifted up again by a stronger force, and when you go up you have a weaker force.
yes

Discard that comment. i thought u were asking a question


RE: Floating :P - Elven - 01-28-2012

(01-27-2012, 04:06 PM)Dobbydoo Wrote: Just a suggestion, but you could use multiple timers with different forces instead of just one, so that when you start going down, you get lifted up again by a stronger force, and when you go up you have a weaker force.
Very good suggestion. I'll try it out! Prob needs like hour of testing tho =.=