Make hero lose life after ability ends

  • Thread starter Thread starter Primal_Fury
  • Start date Start date
P

Primal_Fury

Guest
Okay, I'm currently making some random hero ideas for mine and I ran into a problem with one ability. It is basically the same as Avatar with a different stats, but I want the hero losing it to lose 200 life after Avatar form over. I've tried using triggers for this and I think that mine is close to working. The trigger so far is...

Events: Unit finishes casting an ability.
Conditions: Ability being cast equal to Berserk.
Actions: Set life of casting unit to life of casting unit (Need a -200 here)

The problem I've found is that I can't find the last part at the end about the -200. If anyone could help me figure out a way to make this work, that'd be great.

Also, is there any way to make an aura that increases max hp by a %?
 
Well for starters, you can use two triggers to run an efficient health loss after avatar. One simply starts a timer (no timer window as that'd be pretty silly) for the seconds of your ability (find out the formula pattern you've used which is most likely the level of your ability times something and perhaps even plus or minus something). The second is for when the timer expires, and then you can reduce the health. Why not use a wait? Because waits aren't perfect. If you use a wait, you might end up losing health a little bit AFTER the ability is finished.

There's an action in the dropdown known as "Arithmetic". You can put your (life of casting unit) in the first operand, a minus for the operator, and then 200 on the second operand.

I don't think so. You can trigger one though and that's a nice idea...an aura that lightly boosts hp by some percent.

You'd trigger one by having a trigger check if a unit has a buff and if so add it to a unit group (every .01 second and no, that shouldn't be too laggy). If not, remove it from unit group. Then you can have another unit group that manages the real "default" max hp for it to be restored to a unit upon leaving the group whilst taking a percent of the unit's max hp and adding it to the unit's max hp for units in the group.
 
One works, though you need one variable of type 'Unit'.

Code:
Avatar
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
    Actions
        Set Caster = (Casting Unit)
        Wait 30.00 seconds  //However long Avatar lasts on your ability.
        Unit - Set life of Caster to ((Life of Caster) - 200.00)
 
Okay, thanks. I'm not really great with the editor yet and didn't get all you said, but I did need to skim over it quickly. I'll try some of that out though, and I thought I might need to use a trigger for the aura. Thanks for reply, because that's been bugging me awhile.
 
It'd be better if he used a timer, though. They're more accurate for things like these. Use waits for simple special effects, such as randomly occurring tremors over a various landscape.
 
True, but if he doesn't know too much about the editor, it would be best to use a simpler version rather than the more efficient version that'll be more confusing.
 
True. I get your point, but I personally think timers are simple. All he has to do is create a one shot timer and set a timer variable to said timer and then have the timer variable expire :)
 
Well, I know a bit about the editor. Just not too great with all the trigger types, usually find the stuff by looking around. But for XXConanXXX's idea, since I have 3 levels of it, would I need an Array Variable for each level or something like that? Because each level has different length.
 
That's what I was saying. Wait or timer, it doesn't matter. His thirty seconds is really any number of seconds.

Different length? That's what I expected. Is there a pattern to your seconds increase? I'm just saying, if your avatar lasts ten seconds, then twenty, and then thirty, you will want to wait (Level of Avatar of (Casting Unit) x 10).
 
Well, the ability times for level 1/2/3 are 10/15/20, put waits at that...might need to put them 1 second later or something.
 
Code:
Avatar
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Avatar
    Actions
        Set Caster = (Casting Unit)
        Wait (5.00 + (5.00 x (Real((Level of Avatar  for Caster))))) seconds
        Unit - Set life of Caster to ((Life of Caster) - 200.00)

That'll work.
 
Yep, that did it. Feel kind of bad now that couldn't get on my own...but I would have never got that second action LOL. Thanks to both of you though. My next objective is to get that aura.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top