remembering floats
Moderator: InsideQC Admins
10 posts
• Page 1 of 1
remembering floats
hey its been a while. finally got back online. ugh
anywho. every time the client is put into a level, his floats get reset to their initial variables. how do i make the float "survive" the loading times?
it drives me bonkers lolz
anywho. every time the client is put into a level, his floats get reset to their initial variables. how do i make the float "survive" the loading times?
it drives me bonkers lolz
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
Are floats saved in savegames? My mod is basically one level with goals to be acheived, so a float would be set to 1, 2, 3 etc depending on what goal the player was on. Therefore if the player died and went back to a previous save or just saved and had a break, would that float need to be saved to a parm to survive that?
-

ajay - Posts: 559
- Joined: Fri Oct 29, 2004 6:44 am
- Location: Swindon, UK
Re: remembering floats
behind_you wrote:hey its been a while. finally got back online. ugh
anywho. every time the client is put into a level, his floats get reset to their initial variables. how do i make the float "survive" the loading times?
it drives me bonkers lolz
also you can try with the frik_file to save the parms if you are using darkplaces.
the best beginning is reading the code of the great mod "conquest" of wazat.
The use of the frik-file is very good documented for the parms.
http://www.moddb.com/mods/conquest
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
You've got 16 "spawn parms" in the globals table which are intended to be used for this; should be called parm1..parm16. They survive save/load transitions so they seem ideal. ID Quake uses something like the first 9; that leaves 7 for your own use.
If you need more than 7 floats then you'll need to find something else, but I strongly advise always using the built-in functionality until such a time as you've definitely determined that it's not sufficient for your requirements.
If you need more than 7 floats then you'll need to find something else, but I strongly advise always using the built-in functionality until such a time as you've definitely determined that it's not sufficient for your requirements.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
There's also the scratch1...scratch4 cvars to abuse. IIRC they're not used in standard QuakeC, so you can mess with them without breaking anything.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
However, unlike the parms, those cvars aren't cleared when starting a new game. Making them behave like the parms would require a little more code.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
saved1..saved4 also exist in stock ID Quake don't they? Again you need to reset them for new games, but they do get saved to you config if you need that. (checks - yes, they do exist, and are actually defined in pr_edict.c which makes it explicit that this is their intended use).
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
mh wrote:saved1..saved4 also exist in stock ID Quake don't they?
They are 1.07 additions I believe (Along with scratch as well)
1.06->1.07 has a lot of weird differences that most players believe are de facto standard now. If we could only get Carmack to put out any of the 1.00-1.06 engine sources... a Chocolate Quake could be accurately possible (basically a port that tries to be DOSQuake without any feature creep, but through SDL output, be very portable and able to call on specific quake versions by parameter)
i should not be here
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest