Forum

Lifes

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Lifes

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

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?
JasonX
 
Posts: 411
Joined: Tue Apr 21, 2009 2:08 pm

Postby Karall » Mon Mar 28, 2011 1:31 pm

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.
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby Baker » Mon Mar 28, 2011 1:32 pm

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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby metlslime » Mon Mar 28, 2011 6:18 pm

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.
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest