Realistic Gravity (Concept) -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 10 years ago

I've always wondered if you could reproduce the g_gravity effect, but only on particular sections of the map. As many of you will know, I'm working on a spaceship themed map, and I thought it would be awesome if you could open a hatch, and fly about outside the ship.

There are probably a few ways of achieving this:

G_Gravity Command

- Somehow making the g_gravity cmd, toggleable, so that on exiting the ship the gravity drops from 800 to 50 and allows the player to float. I remember a level on Jedi Outcast singleplayer, when a effect similar to this was achieved. (This wouldn't work on multiplayer, as players inside the ship would float around too).

- I'm sure the g_gravity cmd isn't client specific (it's a pre-set map/server command), but if it was, you could repeat the above step, but use a client_specific scriptrunner to activate the gravity on particular clients who choose to exit the spaceship.

Shaders

- The 'floating in water' effect would fit beautifully to someone floating in space. You could edit a water shader to be completely transparent, but I don't believe it is possible to modify the game code so that the death timer is extended indefinately and the wavy gfx is removed. Please tell me if I'm wrong!

Scripting/Target Push

This idea wouldn't yield as good results as the previous two methods, but should work (in theory).

Multiple trigger_push's would need to be created outside of the spaceship with no defined target key or value. 8 target_push's need to be placed in each of the map's 8 corners with a target_push placed in between all of them. See diagram.

gravity_diagram.jpg

A target_interest, linked to a script_runner would also need to placed next to each of the target_push's.

The concept being that once a player's LOS locked onto a particular target_interest, it would fire the associated target_scriptrunner, thus running a script that would change the trigger_push's target key to the necessary target_push. This, in theory should accelerate the player towards the target making it appear that the player is controlling their movement to a certain degree, simply by looking in the direction he/she wishes to go.

This, is of course a concept, and there a few issues that could lead to it not working:

1. I havn't successfully got an entity to change its key/values in-game, they could be fixed on compile, which would kinda defeat the whole concept. But if in-game shader-remapping on brushes can be achieved, i can't see why entities couldn't undergo a similar principal.

2. What would happen if a player had more than one target_interest in his/her LOS? Well, I wouldn't know, I havn't tried it yet. But there must be a way to make it so that you can narrow the LOS to a certain number of degrees, making it more accurate.

I'm going to give it a go and see what happens, just thought I'd get some input first before I start wasting massive amounts of my time :rolleyes:.




Jonny2199

Click >HERE< to find an idiot.

50 XP

18th September 2005

0 Uploads

1,046 Posts

0 Threads

#2 10 years ago

You can give worldspawn a "gravity" amount (default:800). I assume you know a bit about mapping, with entities and all that stuff... select the worldspawn (brushes) outside your ship and enter the following... Key:gravity Value:50 Should work, I think - if it doesn't, I'm sure someone else will correct me...




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#3 10 years ago

ICARUS scripts can change the gravity on specific entities, but it's bugged up or something. I never got it to work. Maybe you'll have better luck, though.




Yzmo

Modding a game > Playing it...

50 XP

19th May 2006

0 Uploads

168 Posts

0 Threads

#4 10 years ago

Um.. it should be possible to remove the water effects actually.. with the SDK that it.. Don't ask me how though.. I'm no programmer.. Its just that from experience one can do more with the SDK than one would think..

Apart from that.. i THINK the gravity in sections is an ENGINE LIMITATION = Not changeable by the SDK..




Guest

I didn't make it!

0 XP

 
#5 10 years ago

Jonny2199;4567613You can give worldspawn a "gravity" amount (default:800). I assume you know a bit about mapping, with entities and all that stuff... select the worldspawn (brushes) outside your ship and enter the following... Key:gravity Value:50 Should work, I think - if it doesn't, I'm sure someone else will correct me...[/quote]

The worldspawn key and values affect the whole map. You can't section gravity this way as far as I know.

ov_nab622;4567626ICARUS scripts can change the gravity on specific entities, but it's bugged up or something. I never got it to work. Maybe you'll have better luck, though.

I had a nose around too, although I never got round to testing any scripts. I'll give it a go anyhow.

[quote=Yzmo;4567731]Um.. it should be possible to remove the water effects actually.. with the SDK that it.. Don't ask me how though.. I'm no programmer.. Its just that from experience one can do more with the SDK than one would think..

Apart from that.. i THINK the gravity in sections is an ENGINE LIMITATION = Not changeable by the SDK..

I think modifying the water shader would give the most effective results. There was a guy in here who was a serious Jedi Academy programmer, lets hope he stumbles across this thread and says if it can be done. =p

Thanks for the posts so far. Once I've finished the interior of the map, I'm going to some serious script testing!




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#6 10 years ago

To confirm, gravity scripting on the player does not function properly.




Guest

I didn't make it!

0 XP

 
#7 10 years ago
~*Seto*~;4568176To confirm, gravity scripting on the player does not function properly.

Ah, that will save some time.

What do you think if my long-winded method. Do target_interests even work in multiplayer?