![]() |
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
|
Floating :P - Elven - 01-26-2012 I guess I need to ask help once in a while as well from scripting pros. I, myself tried many things but they didn't end up as I wanted. So question is, is it possile to push player exactly that much up that he seems like floating or maybe going very slowly down. Using AddPlayerBodyForce with timer, it may go almost really slowly but at one point it will be pushed back up into the skies. It would be cool if we could create kind of script what will keep Player pretty much floating in the sky and as smoothly as possible ![]() That is, if it is possible ![]() RE: Floating :P - flamez3 - 01-26-2012 Do you mean float up? Or hover across the ground? RE: Floating :P - palistov - 01-26-2012 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 ![]() PHP Code: float fPause = 0.0166f; RE: Floating :P - Shadowfied - 01-26-2012 (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 floatingI didn't know you could make a void like that..(PLAYER_FLOAT("PLAYER_FLOAT") ![]() Also what does float fPause do? RE: Floating :P - palistov - 01-26-2012 @Shadowfied, fPause is just a variable. RE: Floating :P - Shadowfied - 01-26-2012 (01-26-2012, 03:12 PM)palistov Wrote: @Shadowfied, fPause is just a variable.Yeah didn't see the timer at the bottom, just by seeing that I think I understand it. ![]() RE: Floating :P - Your Computer - 01-26-2012 Just use block boxes. RE: Floating :P - Statyk - 01-26-2012 (01-26-2012, 05:57 PM)Your Computer Wrote: Just use block boxes.I was thinking that too, but what if you were walking and want the player to float up, as if someone going to heaven or something, you know? RE: Floating :P - Your Computer - 01-26-2012 (01-26-2012, 06:51 PM)Statyk Wrote: I was thinking that too, but what if you were walking and want the player to float up, as if someone going to heaven or something, you know? Make stairs out of block boxes. RE: Floating :P - Statyk - 01-26-2012 (01-26-2012, 06:56 PM)Your Computer Wrote: Make stairs out of block boxes.But say you don't want the player to descend when going backwards. Then you know it's a "staircase" =\ |