player spawning with mass gravity

Discuss programming in the QuakeC language.
Post Reply
thommoboy
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

player spawning with mass gravity

Post by thommoboy »

ive been trying to do this for ages but how would i make it so the player spawns with sv_gravity 90000
?
DukeInstinct
Posts: 20
Joined: Sat Jul 10, 2010 11:20 pm
Location: DukeLand
Contact:

Re: player spawning with mass gravity

Post by DukeInstinct »

You barely started Quake modding. How have you been trying to do anything Quake related for "ages"?

Anyway have you tried the config file or stuffcmd("sv_gravity 90000");
Image
dr_mabuse
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

Re: player spawning with mass gravity

Post by dr_mabuse »

In Worldcraft / Hammer just place a trigger command brush where your players start and insert your command there..
Should do the trick.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: player spawning with mass gravity

Post by leileilol »

NO NO NO!!
The correct way:

1. Defs.qc


Add this at the bottom since it's a new 1.07 field, and isn't present in 1.01-1.06 QC sources:

Code: Select all

.float gravity; // GRABITTY
2. Client.qc

PutClientInServer






insert

Code: Select all

self.gravity = 112.5;
in there.


3. compile

4. run

5. your fat
i should not be here
thommoboy
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

Re: player spawning with mass gravity

Post by thommoboy »

to me ages is like 1 week lol at the your fat joke also what would i have to type for player speed?
sniperz227
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: player spawning with mass gravity

Post by sniperz227 »

thommoboy wrote:to me ages is like 1 week lol at the your fat joke also what would i have to type for player speed?
thommo im not saying this again stop hounding ppl for your code n actually search around in threads and stuff
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: player spawning with mass gravity

Post by leileilol »

sniperz227 wrote:thommo im not saying this again stop hounding ppl for your code n actually search around in threads and stuff
Kids telling kids to stop......


anyway you can't directly change player speed as easily, Quakeworld allowed it I believe though but that's different
i should not be here
sniperz227
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: player spawning with mass gravity

Post by sniperz227 »

leileilol wrote:
sniperz227 wrote:thommo im not saying this again stop hounding ppl for your code n actually search around in threads and stuff
Kids telling kids to stop......


anyway you can't directly change player speed as easily, Quakeworld allowed it I believe though but that's different
im not stoping him im trying to make him more self dependant
thommoboy
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

Re: player spawning with mass gravity

Post by thommoboy »

i am becoming more self dependant now thanks :P
hogsy
Posts: 198
Joined: Wed Aug 03, 2011 3:44 pm
Location: UK
Contact:

Re: player spawning with mass gravity

Post by hogsy »

I'm sure if you actually bothered to properly look at the QuakeC code yourself then you would probably have figured it out "ages" ago :roll:
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: player spawning with mass gravity

Post by Ghost_Fang »

We all had to have started somewhere sniperz, go easy on him. Its easy to say "look in the exsisting quake code" because to most of us we can actually see where and how that piece of code. Thats like telling someone to learn a foreign language by reading a foreign language. Not that I'm taking his side, its just you gotta give him the right pointers so he can learn.
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

Re: player spawning with mass gravity

Post by Cobalt »

Actually I was thinking about this myself the other day, and dont recall anyone asking about it. What you are wanting is a 'weight' to be added to an entity, depending on the size of the model. I dont think the quake legacy engine has it by default, dunno about darkplaces...but I suppose you could assign a specific for weight:

.float weight;

Then something that calculates a base weight when it looks at the absolute mins + maxs of the model's setsize command , then depending on the model itself's density, you could add in another factor to decrease or increase it, and you would have a ranbge of values to work with. The next thing would be altering the entities velocity with a think and or touch, somethitng like:

// Self , is for example the player
self.velocity = self.velocity / self.weight;
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: player spawning with mass gravity

Post by Spike »

weight won't change how fast you fall...
just read what leileilol said.
sniperz227
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: player spawning with mass gravity

Post by sniperz227 »

Ghost_Fang wrote:We all had to have started somewhere sniperz, go easy on him. Its easy to say "look in the exsisting quake code" because to most of us we can actually see where and how that piece of code. Thats like telling someone to learn a foreign language by reading a foreign language. Not that I'm taking his side, its just you gotta give him the right pointers so he can learn.
i have before ghost i told him what topcis to go to etc.. but he still ignores what im saying like watching mexicougers video's etc.. thats why im going hard because he ignores what were all saying
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: player spawning with mass gravity

Post by goldenboy »

weight won't change how fast you fall...
He might be able to use Gyro to do something like that.
Post Reply