Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Script Request
Script Request [message #352841] Wed, 01 October 2008 19:50 Go to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
I am not sure if this is possible,i want to change a characters gravity by entering a script zone I want it so when someone enters a building the gravity is normal but when there outside there gravity is low. Can anyone whip up a simple script up for me ?

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Script Request [message #352846 is a reply to message #352841] Wed, 01 October 2008 20:34 Go to previous messageGo to next message
Veyrdite is currently offline  Veyrdite
Messages: 1471
Registered: August 2006
Location: Australia, Sydney
Karma: 0
General (1 Star)
Either change the characters preset via script zone (make sure all of the weapons are set up like the beacons so they aren't lost) or you can possibly use JFW_Flying_Infanty.

WOL: Veyrdite Previously: Dthdealer ( a long time ago )
Re: Script Request [message #352872 is a reply to message #352841] Thu, 02 October 2008 01:38 Go to previous messageGo to next message
GEORGE ZIMMER is currently offline  GEORGE ZIMMER
Messages: 2605
Registered: March 2006
Karma: 0
General (2 Stars)
I think it's possible, but the problem is with changing things like that, for the client, you warp all over the place.

Same goes for editing speed serverside.


Toggle Spoiler
Re: Script Request [message #352910 is a reply to message #352841] Thu, 02 October 2008 07:00 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
What you're talking about isn't entirely possible as far as I know. But you could come up with a pretty similar effect...

Maybe if you make a script that you attach the object when it enters the zone, the script would need to make him able to fly, then increamentaly adjust his position on the z axis, but make the increments very small, so it looks pretty fluid, and also make it happen every 0.01 of a second or something on a timer loop.
Perhaps it might look OK. You could even at the start of the script make the player play an animation, like his arms and legs flapping all over the place.
Pretty interesting actually, I wonder if it wouldd look totally shit or not so bad.

Saturday is planned as my coding day for reborn and APB, remind me Saturday morning about this and i'll write it, shouldn't really take too long at all to be honest, just I am really pumping in some hours at work this week and hav little time right now.


[Ninja edit]

Perhaps have it decremental too, but randomly, so you're kinda bobbing up and down, play some animations here and there. Really try and go for a random low gravity effect.
I think this could work. Maybe.



[Updated on: Thu, 02 October 2008 07:24]

Report message to a moderator

Re: Script Request [message #352934 is a reply to message #352910] Thu, 02 October 2008 13:41 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3806
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
reborn wrote on Thu, 02 October 2008 08:00

What you're talking about isn't entirely possible as far as I know. But you could come up with a pretty similar effect...

Maybe if you make a script that you attach the object when it enters the zone, the script would need to make him able to fly, then increamentaly adjust his position on the z axis, but make the increments very small, so it looks pretty fluid, and also make it happen every 0.01 of a second or something on a timer loop.
Perhaps it might look OK. You could even at the start of the script make the player play an animation, like his arms and legs flapping all over the place.
Pretty interesting actually, I wonder if it wouldd look totally shit or not so bad.

Saturday is planned as my coding day for reborn and APB, remind me Saturday morning about this and i'll write it, shouldn't really take too long at all to be honest, just I am really pumping in some hours at work this week and hav little time right now.


[Ninja edit]

Perhaps have it decremental too, but randomly, so you're kinda bobbing up and down, play some animations here and there. Really try and go for a random low gravity effect.
I think this could work. Maybe.

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.


Re: Script Request [message #352955 is a reply to message #352841] Thu, 02 October 2008 17:58 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
it will be part of the client

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Script Request [message #352987 is a reply to message #352955] Fri, 03 October 2008 03:36 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
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.







Re: Script Request [message #353006 is a reply to message #352987] Fri, 03 October 2008 07:42 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
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.


http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: Script Request [message #353028 is a reply to message #352841] Fri, 03 October 2008 10:50 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
No, I would have to write it all for you.


Re: Script Request [message #353119 is a reply to message #352841] Sat, 04 October 2008 03:47 Go to previous messageGo to next message
alesian is currently offline  alesian
Messages: 3
Registered: October 2008
Karma: 0
Recruit
If you change the characters with script,it may change the entire game functionality, you better to read the help description of this game and go for further changes..
______________________________
Mens Carhartt Winter Coats
dubai real estate
Re: Script Request [message #353241 is a reply to message #353119] Sat, 04 October 2008 17:40 Go to previous message
nopol10 is currently offline  nopol10
Messages: 1043
Registered: February 2005
Location: Singapore
Karma: 0
General (1 Star)
Are you sure you know what you're talking about? A mod for a game means changing the entire game's functionality in terms of gameplay...

nopol10=Nopol=nopol(GSA)

http://i14.photobucket.com/albums/a330/napalmic/siggy.jpg
Previous Topic: Mapper needed!
Next Topic: Can you make me {Request} a mammoth tank wit the color orange and black stripes
Goto Forum:
  


Current Time: Tue Jul 09 22:30:41 MST 2024

Total time taken to generate the page: 0.01203 seconds