Re: Script Request [message #353006 is a reply to message #352987] |
Fri, 03 October 2008 07:42 |
|
Gen_Blacky
Messages: 3250 Registered: September 2006
Karma:
|
General (3 Stars) |
|
|
reborn wrote on Fri, 03 October 2008 05:36 |
Jerad Gray wrote on Thu, 02 October 2008 16:41 |
If you think changing the character's gravity setting looks bad this looks equally bad on client side, especially sense if here is enough lag and you have fly turned on you will be able to move a little bit before being snapped back into place by the server update. You would have to also make a system to make the character go back down as well, and at the same time look for the ground so you don't go down through it, and if there is a roof above you, set pos well take you right though that as well.... thats a lot of fun to play with.
|
Why would I have to make a system to set them back on the ground again? When they leave the zone gravity shoulkd return to normal... They would just fall. You could perhaps attach a no fall damage script to them which removes itself when they stop falling. Which is easy enough to do, just start a very quick timer loop, which compares there current z axis position to there previous z axis position, and if it is lower then they are still falling, but if it is not lower then the last time it looped, they have stopped falling, so remove the script.
As for the roof, he obviously knows where he is going to be placing the zones, you could also write the script to have a max increamental limit as a client input parameter, like the script is not allowed to raise his z axis position more then 5.00f then his current position. so do a simple boolean check every time you want to raise the height, if the new height is greater or equal to 5 more then his original z axis position then start the bobbing effect, or lower him, whatever...
It's never going to look awesome trying to do it server side, but this would deffinately be the way I chose to tackle the problem in the first instance.
Gen_Blacky wrote on Thu, 02 October 2008 20:58 | it will be part of the client
|
If you're distributing it to the client, then you could always clone every character preset in level edit, but make the clone have a low weight and gravity setting. Then when they enter the zone attach a script to them which turns them into there cloned preset, and sets there health, armor, weapon ammo etc etc the same as the original characters was at the time of enterng the zone.
Then it would look like a pretty fluid tansition.
You could always have it a gradual effect too, but that would require multiple zone scripts and multiple clones of each preset.
|
Is there a script that checks the character preset so it changes to the right character , so like if both a havoc or a hot wire walk into the script zone they would change into there moded presets.
|
|
|