Lifes

Discuss programming in the QuakeC language.
Post Reply
JasonX
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Lifes

Post by JasonX »

I'm interested in making a life system for Quake, just like in old platformers. If you lose all your lifes, the game progress is deleted (collectables, ammo, etc. are clared) and you're transported to the first level. Can this be done just with QuakeC?
Karall
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Post by Karall »

I think you can do all this in QuakeC. For the life system make a variable that is like 3, and if that variable is 0, then change the map to map number one wich i dont know exactly how to do. SetNewParms should take care of loosing all of your stuff i think. Make sure that you know some basic coding first.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

The dying 3 times and losing everything and getting switched back to whatever your start level is certainly possible.

Create a deathcount .float field, increment it on death and if > 3 reset the player's stuff and do a changelevel to your start map.

In Quake, after you kill the Chthon, your health and armor and weapons and ammo is reset ... but you keep the rune ... and you return to the start level. All of that is done in QuakeC.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Post by metlslime »

Baker wrote:Create a deathcount .float field, increment it on death and if > 3 reset the player's stuff and do a changelevel to your start map.
Better to keep track of "lives" rather than "deaths" because if player picks up an extra life item in a level, what does it do? reduce the death count? No, it should increase the life count.
Post Reply