Forum

Inter-level collectables

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Inter-level collectables

Postby JasonX » Mon Mar 28, 2011 12:44 pm

Is it possible to create items that the game tracks all the way until it's completion? I can find an item here, at one level, and one at that level, and if i have more than 10, i can access another level (the slipgate only appears when i get more than those 10 items).

Working on something similar to the SM64 stars, but for quake. Thinking about something like tokens, or heads, don't know yet. :roll:
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby mh » Mon Mar 28, 2011 12:54 pm

The runes in SP Quake work just this way, and use serverflags for it. Check out the entrance to end.bsp from ID's start.bsp and you'll see.
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
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby andrewj » Tue Mar 29, 2011 3:18 am

Does this line from sv_main.c mean that using more than the lowest four bits of serverflags will be problematic?

Code: Select all
items = (int)ent->v.items | ((int)pr_global_struct->serverflags << 28);
andrewj
 
Posts: 133
Joined: Mon Aug 30, 2010 3:29 pm
Location: Australia

Postby Spike » Tue Mar 29, 2011 12:42 pm

the lowest four 'bits' are stored in the upper 4 bits of the items stat.
If you have more than 4 bits, they'll harmlessly shift left into nothingness. The client won't see them. The lower 4 bits (runes) will be unaffected.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Inter-level collectables

Postby daemonicky » Wed Apr 27, 2011 9:25 pm

JasonX wrote:Is it possible to create items that the game tracks all the way until it's completion? I can find an item here, at one level, and one at that level, and if i have more than 10, i can access another level (the slipgate only appears when i get more than those 10 items).

Working on something similar to the SM64 stars, but for quake. Thinking about something like tokens, or heads, don't know yet. :roll:


I guess it is possible trought abuse of parm1-16 http://www.inside3d.com/qcspecs/qc-glob.htm#QC-GLOB , 16 floats which should be carried to next level. It could be used to instantiate some entitities you want. Although it would be limited.
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest