Forum

player spawning with mass gravity

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

player spawning with mass gravity

Postby thommoboy » Thu Jan 19, 2012 6:48 am

ive been trying to do this for ages but how would i make it so the player spawns with sv_gravity 90000
?
thommoboy
 
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

Re: player spawning with mass gravity

Postby DukeInstinct » Thu Jan 19, 2012 9:03 am

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
User avatar
DukeInstinct
 
Posts: 20
Joined: Sat Jul 10, 2010 11:20 pm
Location: DukeLand

Re: player spawning with mass gravity

Postby dr_mabuse » Thu Jan 19, 2012 12:25 pm

In Worldcraft / Hammer just place a trigger command brush where your players start and insert your command there..
Should do the trick.
User avatar
dr_mabuse
 
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

Re: player spawning with mass gravity

Postby leileilol » Thu Jan 19, 2012 1:32 pm

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
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: player spawning with mass gravity

Postby thommoboy » Thu Jan 19, 2012 1:47 pm

to me ages is like 1 week lol at the your fat joke also what would i have to type for player speed?
thommoboy
 
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

Re: player spawning with mass gravity

Postby sniperz227 » Thu Jan 19, 2012 9:26 pm

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
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: player spawning with mass gravity

Postby leileilol » Fri Jan 20, 2012 4:23 am

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
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: player spawning with mass gravity

Postby sniperz227 » Fri Jan 20, 2012 4:27 am

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
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: player spawning with mass gravity

Postby thommoboy » Fri Jan 20, 2012 5:44 am

i am becoming more self dependant now thanks :P
thommoboy
 
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

Re: player spawning with mass gravity

Postby hogsy » Fri Jan 20, 2012 1:08 pm

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:
User avatar
hogsy
 
Posts: 198
Joined: Wed Aug 03, 2011 3:44 pm
Location: UK

Re: player spawning with mass gravity

Postby Ghost_Fang » Sun Jan 22, 2012 1:36 am

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.
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: player spawning with mass gravity

Postby Cobalt » Sun Jan 22, 2012 6:43 am

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;
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: player spawning with mass gravity

Postby Spike » Sun Jan 22, 2012 7:11 am

weight won't change how fast you fall...
just read what leileilol said.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: player spawning with mass gravity

Postby sniperz227 » Sun Jan 22, 2012 11:07 pm

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
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: player spawning with mass gravity

Postby goldenboy » Mon Jan 23, 2012 2:32 am

weight won't change how fast you fall...


He might be able to use Gyro to do something like that.
User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest