Inside3D!
     

Storing player values that isn't reset on spawn

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Ran



Joined: 05 Mar 2009
Posts: 3

PostPosted: Thu Mar 05, 2009 4:20 pm    Post subject: Storing player values that isn't reset on spawn Reply with quote

Hello! A beginner QC programmer here. I'm trying to make a small lan unmod with two different classes (one is supposed to hunt the other one). But everytime a player dies they lose their class in some way.

I started by using the class guide found on this site.

How do I change this? It's probably really easy.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Mar 05, 2009 4:53 pm    Post subject: Reply with quote

Simple: don't reset it!

You can use the parms stuff to transfer per-player info between levels. But that's not needed when you're not changing level, as those fields are only cleared if you clear them (or the player disconnects).
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Ran



Joined: 05 Mar 2009
Posts: 3

PostPosted: Thu Mar 05, 2009 5:09 pm    Post subject: Reply with quote

Hm, okay. Weird, I've searched trough all code for ".classtype = ", but I never change that to any other value than my class value.
Whenever I respawn, the players .classtype will change to 0.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Mar 05, 2009 5:57 pm    Post subject: Reply with quote

Well in which function do you set it? And do you set it to what its meant to be at that point?
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Ran



Joined: 05 Mar 2009
Posts: 3

PostPosted: Thu Mar 05, 2009 6:55 pm    Post subject: Reply with quote

I set it in two places. First in weapons as an impulse, second in client in ClientObituary().

I set it to the right value, everything works out (I lose my weapon just like you are supposed to, and weapon damage is changed etc. just like it's coded), the only problem is that when I respawn I lose my classtype.
Back to top
View user's profile Send private message
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Wed Mar 11, 2009 12:12 am    Post subject: Reply with quote

What might be happening is that you're not reading it properly when the player respawns.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group