Making a unit die when mana hits 0

  • Thread starter Thread starter Tyko
  • Start date Start date
T

Tyko

Guest
I want to make a unit die, when the mana bar hits zero.
But I have no idea how to do this.
Please help me...

(PS thx for the minus mana gen...)
 
Code:
Event: 
       *your unit* 's Mana becomes less than 1.00
Condiditon:
none
Action:
Kill (triggering unit)
 
Make a unit die when mana becomes 0, again...

Sorry I wasn't clear befor. I want to make a certain unit-type die when its mana bar hits zero. Not a unit on the map.
So then I cant use the:
event
when units mana becoms zero
...
kill unit

Is it possible to make a unit-type die when its mana becomes zero
Please help me again...
 
Event:
*your unit* 's Mana becomes less than 1.00
Condiditon:
unit type = to 'your unit'
Action:
Kill (triggering unit
 
*your unit*??

Instead of *your unit* I have to choose a unit that I have already placed on the map. Does it mather what unit I choose?
I dont understand, I am so confused... X-)
 
w/e said:
Event:
*your unit* 's Mana becomes less than 1.00
Condiditon:
unit type = to 'your unit'
Action:
Kill (triggering unit

he wants it for all units of a unit-type, not a single specific unit which is the only thing that does.

Code:
[I]Event [/I]- Time - Every 1.00 seconds of game time

[I]Action[/I] - Unit Group - Pick every unit in (Units of type *whatever unit*) and do (If ((Mana of (Picked unit)) Less than or equal to 1.00) then do (Unit - Kill (Picked unit)) else do (Do nothing))

this is the best i can get it, i can't find anything in events that triggers when a units mana hits zero.
 
Code:
NoMana
    Events
        Time - Every 5.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units of type Footman) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Mana of (Picked unit)) Less than 1.00
                    Then - Actions
                        Unit - Kill (Picked unit)
                    Else - Actions

While this probably works, I would still try to come up with some other way of doing this...
 
Another way. Dont know wich is best.

Nope, no event here :D
Code:
Mana
    Events
    Conditions
    Actions
        Unit - Kill (Triggering unit)

Here is the event
Code:
New
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        Trigger - Add to Mana <gen> the event (Unit - (Triggering unit)'s mana becomes Less than 1.00)

If you have units on the map from the begining that should be affected
Code:
Start
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units of type Footman) and do (Trigger - Add to Mana <gen> the event (Unit - (Picked unit)'s mana becomes Less than 1.00))


Dont care about this:
Now is it only to figure out what is worst, a pick every unit each 5 sec or a trigger event that you cant remove... I am talking about leaks... The group leak can easy be removed but not the event. Does events leak? I worry to much about leaks :(
 
Only while selected...

One last thing, I promise,
Is it possible to kill a unit when its mana becames zero AND the unit is selected...
Only while it is selected...
 
Code:
Mana Kill
    Events
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is selected by (Owner of (Matching unit))) Equal to True)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Mana of (Picked unit)) Less than 1.00
                    Then - Actions
                        Unit - Kill (Picked unit)
                    Else - Actions
this is basically aceheart's with the change he said later, just showing what it would look like since i couldnt find another way...maybe you can look round in WEU.
 
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