@dancar
This is easy just write a couple/few scripts
Script 1: clone nearest health to player
Script2: an AI for cloned health boxes to find the player much like a bot would
From there it's simple, every X seconds the nearest health box will clone itself, navigate and "jump" into the player. I'm sure you will agree this is the most sensible way to go. You could even figure out how to put a noclip flag on all cloned health so it doesn't have to worry about walls. A slight upgrade and you could have bad health chasing the player around muah-ha-ha
Announcement
Collapse
No announcement yet.
Regeneration
Collapse
X
-
The idea was that your health regenerates over a certain period of time. I don't know, 5 points x second.Originally posted by R00k View PostWait, what are you *really* trying to do; just change the behavior of the Pent?

I hate invulnerability in all games, no matter is for player or monsters, I can't stand it.
Leave a comment:
-
Wait, what are you *really* trying to do; just change the behavior of the Pent?Originally posted by dancar View PostThanks, looks really good, but I have a question, stupid probably. If I want to tell the game to change the inv. powerup into the regen. from Total Destruction, what I must do?
The code he posted above will also regen the armor value too. I didnt go that far because pent doesnt protect armor, and i was too lazy to type that much
Leave a comment:
-
Basically,you go to items.qc and you should find a void() powerup_touch
(or something like that) and find the powerups code and their self.netname.
change self.netname to anything
example
self.netname= "The Stupid Slow-Regen Thing!"
If you want to make the IT_INVULNERABILITY into a IT_REGEN
simply find all mentions of IT_INVULNERABILITY and change it to IT_REGEN.
Don't forget the defs.qc part,though.
Leave a comment:
-
Untried, untested and probably wrong is the only fun way to code!!Originally posted by Mr.Burns View PostIf no QuakeC coder but I would probably experiment with something like the following:
Obviously the above is untried, untested and probably wrong in a number of aspects but it might helpCode:local float increm, maxh; maxh = self.max_health increm=10 if (self.health < maxh) { self.health = self.health + increm; }
Kind regards
Monty
Leave a comment:
-
From Total Destruction II
Last available source code here:Code:// // RUNE 4 REGENERATION // if (runeof(self) == 4) { local float ma; // regenera health if (self.health < self.max_health) { self.health = self.health + 5; if (self.health > self.max_health) self.health = self.max_health; } // regenera armor if (self.armorvalue > 0) { if (self.armortype == 0.3) ma = 100; else if (self.armortype == 0.6) ma = 150; else if (self.armortype == 0.8) ma = 200; else if (self.armortype >= 0.9) ma = 250; else { self.armortype = 0.3; // bugfix... armadura verde inicial ma = 100; } if (self.armorvalue < ma) self.armorvalue = self.armorvalue + 5; if (self.armorvalue > ma) self.armorvalue = ma; } } }
https://mega.nz/#!IdZxAALI!7dvZJD-Oo...hcaoLAOFx2Tq0I
Leave a comment:
-
I would trust Rook's QuakeC over mine any day. Come to think of it I would trust Rook's Quake anything over mine every day and twice on weekends ;-)
In case you didn't know Rook is one very accomplished and talented QuakeC guy and we're lucky to have him as one of our members
Kind regards
Monty
Leave a comment:
-
Thank you allOriginally posted by R00k View Postlook in client.qc find "CheckPowerups" find the portion that has the pent
then do what Burns suggests.
if (self.invincible_finished)
{
if (self.health < max_health) self.health += 1;
ROOk, your code is slight different from Burns'one (if not, I apologie). I will try your, right?
Leave a comment:
-
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.Originally posted by dancar View PostI 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?
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.
Leave a comment:
-
you could look into the QC of the drake mod, they actually have two regeneration powerups called the 'rejuvinators'
https://www.quaddicted.com/webarchiv...%3Fid=169.html
and they included the QC source with the mod
Leave a comment:
-
If no QuakeC coder but I would probably experiment with something like the following:
Obviously the above is untried, untested and probably wrong in a number of aspects but it might helpCode:local float increm, maxh; maxh = self.max_health increm=10 if (self.health < maxh) { self.health = self.health + increm; }
Kind regards
Monty
Leave a comment:
-
Regeneration
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?Tags: None
Leave a comment: