Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: GerardS0406 on July 30, 2015, 05:03:11 am
Title: Gravity Change
Post by: GerardS0406 on July 30, 2015, 05:03:11 am
How to make gravity change in a certain part of a map.
Title: Re: Gravity Change
Post by: RadimaX on July 30, 2015, 06:05:47 am
you can only change gravity for Everybody or Nobody in cod WaW :P thats why the teleporter in "the bedroom" needs every person to be on it to get into the "space room" with perks otherwise 1 would go there and trigger the gravity command and 3 other people would suddenly go flying around the regular sections of the map lol
Title: Re: Gravity Change
Post by: GerardS0406 on July 30, 2015, 06:08:54 am
you can only change gravity for Everybody or Nobody in cod WaW :P thats why the teleporter in "the bedroom" needs every person to be on it to get into the "space room" with perks otherwise 1 would go there and trigger the gravity command and 3 other people would suddenly go flying around the regular sections of the map lol
makes sense and that is what I wanted to do just don't know the way of doing that, I have a space ship type thing that when triggered everyone would be sent to the moon.
Title: Re: Gravity Change
Post by: vinnyz500 on July 30, 2015, 07:30:27 am
you can only change gravity for Everybody or Nobody in cod WaW :P thats why the teleporter in "the bedroom" needs every person to be on it to get into the "space room" with perks otherwise 1 would go there and trigger the gravity command and 3 other people would suddenly go flying around the regular sections of the map lol
But on leviathan there is low gravity when ur in the water but players are in different areas, i think that is what he is refering to. Some script like that
Title: Re: Gravity Change
Post by: Eternal_Fire on July 30, 2015, 11:03:48 am
you can only change gravity for Everybody or Nobody in cod WaW :P thats why the teleporter in "the bedroom" needs every person to be on it to get into the "space room" with perks otherwise 1 would go there and trigger the gravity command and 3 other people would suddenly go flying around the regular sections of the map lol
Well if you want gravity changing to be simple then yeah, you are restricted to everyone having it or no one having it, but both project viking and leviathan had gravity that only affected certain players. Project viking with afterlife and leviathan with going out into the water and going inside.
EDIT: Actually you probably know this don't you xD considering you helped make leviathan, sorry, bad on my end.
Title: Re: Gravity Change
Post by: DeletedUser on July 30, 2015, 04:17:11 pm
Could you not, check for a player jumping, then use setVelocity when they are in the area you want to have low gravity.
Not too sure, but thought it may work :poker:
Title: Re: Gravity Change
Post by: MakeCents on July 30, 2015, 04:28:51 pm
Lol, no my bad. You prob were not alone, lol. Why can't every one see my thoughts? :D
Title: Re: Gravity Change
Post by: RadimaX on August 01, 2015, 02:09:46 pm
as i said: you can change gravity for EVERYBODY or NOBODY in cod WaW topic is called GRAVITY CHANGE, some people fail to see that...
Title: Re: Gravity Change
Post by: Ege115 on August 01, 2015, 03:32:16 pm
Here's a low gravity script I made a long long time ago. It may be not the best script but it works decently as far as I know. You make trigger multiples in the map with the KVP, If you touch those, you should have lower gravity when jumping.
If anyone wants this, feel free to edit.
EDIT: Also tell me if any glitches happens with this, or if any other scripter sees something stupid. Note this was a long time ago so I know I should improve it with what I know now. :P
Title: Re: Gravity Change
Post by: MakeCents on August 01, 2015, 05:32:15 pm
EDIT: Also tell me if any glitches happens with this, or if any other scripter sees something stupid. Note this was a long time ago so I know I should improve it with what I know now. :P
I had a few concerns, even questions, maybe some suggestions. I personally thread as little on the player as possible, cause you get into the, did I end it on death, do I got to start it again, shit, is it running twice? kind of stuff. Like here it doesn't appear you end it on death but you do start it on spawn each spawn. So, since you are using trigger multiples, I would rather use the triggers, then the players to thread things on for the most part. I didn't test any of this, just took your script and tweaked it. What you think?
Title: Re: Gravity Change
Post by: Ege115 on August 01, 2015, 07:10:17 pm
I had a few concerns, even questions, maybe some suggestions. I personally thread as little on the player as possible, cause you get into the, did I end it on death, do I got to start it again, shit, is it running twice? kind of stuff. Like here it doesn't appear you end it on death but you do start it on spawn each spawn. So, since you are using trigger multiples, I would rather use the triggers, then the players to thread things on for the most part. I didn't test any of this, just took your script and tweaked it. What you think?
Oh shit, didn't mean to make it end on death, fixed on mine now. :-X
Yea yours is much more effective, I usually make player threads on most of my scripts, but I admit that trigger waits are better in this case.
Title: Re: Gravity Change
Post by: DidUknowiPwn on August 01, 2015, 07:36:56 pm
jump_height is a global var it won't affect anyone but host.