Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-11-15 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
November 15, 2012, 12:51:32 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Regen engine  (Read 274 times)
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 414


⠠⠵


View Profile
« on: October 09, 2012, 08:08:53 AM »

I had a look at it today and fixed it up a bit. I think it's a really great engine (didn't I suggest it back in the day Cheesy?) but one thing it's lacking is a way to customize the regen/decay to the personal needs of a race.

Right now you set the fHPRegen or fHPDecay buff on a player and everything just works. That's great. But the problem I have with this, is that there is no way to further customize this behavior while still benefitting from the Engine doing the regeneration/decay for me. For example I have a Medic race on TF2 that has a healing wave and receives uber for the HP healed around him. I'd love to use the regen engine to do the HP regeneration for me, while still being able to give the Medic uber.
Same thing with the decay "buff". Soul Reaper gives a decay buff to enemys around him, meaning they'll lose HP, but the Soul Reaper is never credited for it, as there is currently no way to tell who invoked the decay buff on the player.

Does anybody have an idea how we could improve upon this engine? Maybe brush it up to be similiar with the aura engine?
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2088



View Profile WWW Email
« Reply #1 on: October 09, 2012, 08:34:15 AM »

#define HEALTH_LOST_PARTICLE GetApparentTeam(client) == TEAM_RED ? "healthlost_red" : "healthlost_blu" ??

bad style because there is a client argument
#define KILL_NAME GameTF() ? "bleed_kill" : "damageovertime" is ok

but guys, dont rely too much on compiler directives


what do you mean feet? the hp loss particle is meant to be displayed at the feet.
Logged

DarkEnergy
Revan
Sr. Member
****
Posts: 285



View Profile
« Reply #2 on: October 09, 2012, 09:11:50 AM »

even the aura engine(while its ultimately powerfull) is lacking some features. for example you cannot get the owner of the aura you just entered.
Logged

#war3source
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 414


⠠⠵


View Profile
« Reply #3 on: October 09, 2012, 10:37:23 AM »

#define HEALTH_LOST_PARTICLE GetApparentTeam(client) == TEAM_RED ? "healthlost_red" : "healthlost_blu" ??

bad style because there is a client argument

I'm aware, it's ok though in the context used. Practicability over pragma

what do you mean feet? the hp loss particle is meant to be displayed at the feet.

Since when? What's that based off?
Logged

Revan
Sr. Member
****
Posts: 285



View Profile
« Reply #4 on: October 09, 2012, 01:56:49 PM »

#define HEALTH_LOST_PARTICLE GetApparentTeam(client) == TEAM_RED ? "healthlost_red" : "healthlost_blu" ??

bad style because there is a client argument

I'm aware, it's ok though in the context used. Practicability ov
er pragma
idk if sourcepawn supports pre-processor macros with arguments(i think it does) why don't use them
Logged

#war3source
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 414


⠠⠵


View Profile
« Reply #5 on: October 09, 2012, 03:32:25 PM »

When you say

Code:
#define FOOBAR "Brizbaz"

OnSomething() {
    War3_ChatMessage(0, FOOBAR);
}

All that happens when you compile is that the compiler turns it into

Code:
OnSomething() {
    War3_ChatMessage(0, "Brizbaz");
}

So what you defined is filled in for your variable. Doing that in the regen engine seemed like the most readable and hassle free way to do this, since I neither like long lines nor doing something with strcopy. I'm not aware of a definite styleguide for SourcePawn, but I sure think that engine turned out pretty Tongue
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2088



View Profile WWW Email
« Reply #6 on: October 09, 2012, 04:20:15 PM »

at feet cuz i feel it looks weird popping out of heads
Logged

DarkEnergy
-El Diablo
Global Moderator
Full Member
*****
Posts: 218


View Profile
« Reply #7 on: October 09, 2012, 04:40:52 PM »

I like the health popping out of heads.

If you put it at the feet, it maybe covered up by the races feet effects.. smoke, fire, water, etc.
Logged
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 414


⠠⠵


View Profile
« Reply #8 on: October 10, 2012, 12:12:12 PM »

at feet cuz i feel it looks weird popping out of heads

I feel like it looks weird/buggy when it pops from the feet, which is why I felt like fixing it due to it looking buggy to me. I also agree with Diablo that feet are an obvious spot to put particle effects, TEs and other stuff to indicate movement skills etc.

Having played with the decay at the top for a bit now I really feel like it fits better there.
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2088



View Profile WWW Email
« Reply #9 on: October 10, 2012, 01:47:57 PM »

so, u planning to write some uber complicated script to keep track of the amount of hp healed?
Logged

DarkEnergy
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 414


⠠⠵


View Profile
« Reply #10 on: October 10, 2012, 03:27:07 PM »

I don't really have an idea how to handle this yet
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2088



View Profile WWW Email
« Reply #11 on: October 10, 2012, 04:10:53 PM »

more complicated than just having your race keep track of another aura just to simulate hp heal count
Logged

DarkEnergy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!