Site Navigation
QuakeOne News
» Latest News
» News Archives
» QuakeOne Movies

QuakeOne Help
» File Downloads
» Quake Help
» Quake Servers

QuakeOne Community
» Forums
» Chat *new*
» Poll Booth
» Memberlist
» Member Map

Site Info
» Community Rules
» Moderator List

» Buy Quake

Visit QuakeOne.com On Facebook!Visit QuakeOne
on Facebook

Log in
User Name:

Password:

Not a member yet?
Register Now!
Online Users: 346
3 members and 343 guests
davebeats83, talisa
Most users ever online was 2,542, 06-04-2016 at 12:58 AM.
Go Back Home > Forum Search Forums

Thread: Regeneration
View Single Post
Unread 02-28-2017, 12:39 AM   #4 (permalink)
Dutch
Chthon
Dutch's Avatar
USER INFO »
Posts: 1,042
+/-  Reputation: Dutch has a spectacular aura aboutDutch has a spectacular aura about
Join Date: Jan 2014
Currently: Offline
Originally Posted by dancar View Post
I would like to change the invulnerability powerup into a regenaration powerup.

This's the original code:

void () item_artifact_invulnerability =
{
self.touch = powerup_touch;
precache_model ("progs/invulner.mdl");
precache_sound ("items/protect.wav");
precache_sound ("items/protect2.wav");
precache_sound ("items/protect3.wav");
self.noise = "items/protect.wav";
setmodel (self, "progs/invulner.mdl");
self.netname = "Pentagram of Protection";
self.items = IT_INVULNERABILITY;
setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);
StartItem ();
};

What should I write to make the change, please?
Keep in mind, this is only the code for the Pentagram's spawn function (i.e. the in-game item). The behavior it has on the player is found in several different functions. T_Damage(), CheckPowerUps(), and PutClientInServer() are just a few off the top of my head.

This is actually fairly in-depth if you're not entirely familar with the QC base. The coding itself should not be that difficult, but tracking down all the functions that relate to the pentagram may be. You'll want to search for all functions that reference IT_INVULNERABILITY and self.invincible_time (I believe that's what the global float is called) and alter them from there.
Reply With Quote
 

All times are GMT -6. The time now is 09:21 PM.


eXTReMe Tracker