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
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(timer, fPause, timer);
}
I didn't know you could make a void like that..(PLAYER_FLOAT("PLAYER_FLOAT")
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
?