Regen value at run time

  • Thread starter Thread starter PsychoPif
  • Start date Start date
P

PsychoPif

Guest
I would like to set a variable to the hero hp and/or mana current regeneration rate.

I've found a way to get the movement speed but not the regen.

I guess I could compute it from the hero current str/int, but then I would need the check for each buff avaible in the game and add it to the str/int bonus if the hero is under that spell.... That would be a real pain.

Anyone got an idea or answer ?
 
Your best bet would be to calculate it. Could you let us know why and maybe we can find an alternative solution? You could try pausing the unit and using a timer and equation... but it would rarely come out right (At least not as a real... maybe a .5 but doubtful)
 
It's only to provide more information to the players, so I don't need the precise amount.
 
What about something like this? Compleatly untested so it may be wrong...


Variables:
Hero is a unit array that hold each layer hero
DeltaD is a rear variable
Rest is real arrays

Code:
    Events
        Time - Every 5.00 seconds of game time 
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Hero[(Integer A)] Not equal to No unit
                    Then - Actions
                        Set OldVaule[(Integer A)] = NewVaule[(Integer A)]
                        Set NewVaule[(Integer A)] = (Mana of Hero[(Integer A)])
                        Set DeltaR = (NewVaule[(Integer A)] - OldVaule[(Integer A)])
                        // The difference beetwen the old mana vaule and the new, ie mana gain over 5 sec.
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                DeltaR Greater than 0.00
                                DeltaR Less than 50.00
                                // If it is less than 0 he has used an ability, if it is greater that 50 (or a vaule the fits your map) he has used a mana poition.
                                // A better soulution whould be detect each time he uses a spell and set a variable to false, inside the else set that variable to true and use that variable as condition
                            Then - Actions
                                Set Regain[(Integer A)] = (DeltaR / 5.00)
                                // This is the mana/sec regneration
                            Else - Actions
                               // If the vaule is out of range we cannot use it insteed we use the old vaule
                    Else - Actions
 
This is a good start thanks, I'll see what I can come up with this and I'll get back at you.

The information qill be requested by the player so I don't have to run the trigger all the time.
 
Here's what I got. It's working, but as expected, it's not precise or at least not enough to base any effect on it.

Code:
HPRegen
    Events
        Player - Player 1 (Red) types a chat message containing -hpregen as An exact match
   Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Heroes[(Player number of (Triggering player))] is alive) Equal to True
            Then - Actions
                Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Set Heroes[(Player number of (Triggering player))] = (Picked unit))
                Game - Display to (All players matching ((Color of (Matching player)) Equal to (Color of (Triggering player)))) the text: Calculating health ...
                Set HPBeforeRegen = (Life of Heroes[(Player number of (Triggering player))])
                Wait 3.00 seconds
                Set HPAfterRegen = (Life of Heroes[(Player number of (Triggering player))])
                Game - Display to (All players matching ((Color of (Matching player)) Equal to (Color of (Triggering player)))) the text: (Your hero hp regeneration rate is  + (String(((HPAfterRegen - HPBeforeRegen) / 3.00))))
            Else - Actions
                Game - Display to (All players matching ((Color of (Matching player)) Equal to (Color of (Triggering player)))) the text: You have no hero at...

For the time being, it will be enough as a system message, but I have an idea about a skill that turn the target hero regeneration rate into a DOT. The more the rate will be, the more damage the hero will take. Since it will probably be used at the same time as other damages, I cannot do that kind of calculation. If you or anyone has an idea how to do this, it would be nice.

Thanks for the help.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top