Mana Expendated Ammunation

Somatic

You can change this now in User CP.
Reaction score
84
Was wondering if there is a way to clearly detect an attack done by a unit not just using the "A unit has being attacked" trigger as even non-successful attacks are also triggable with this event. As i am getting units to attack with the set of "Mana" as Ammunation. I would like a working set of scripts for this system for my map and hope that its MUI. Plus i need some examples of a "Reloading" system to follow up with this system. Thanks to those who would give a hand here =)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
How about A Unit Takes Damage? The only problem is it's a specific unit event.
 

Somatic

You can change this now in User CP.
Reaction score
84
That is what i am trying to avoid. So any possible existing system out there is around?
Btw, another problem i am facing is that when i made an upgrade for a unit, i want it to be like Steam Tank, where after the "barrage" upgrade the unit which is trained will be changed to a new unit. any idea if this can be done without trigger? i have an existing one where i have to disable the newly upgrade unit before the upgrade is resarched. Thanks again. =)
 

Icyculyr

I'm a Mac
Reaction score
68
Code:
[B]MyTrigger[/B]
Events
    (Added fro below)
Conditions
Actions
    'Your actions when they deal any damage.


Code:
[B]Setup[/B]
Events
    A unit enters playable map area
Conditions
Actions
   Add to MyTrigger the event Triggering Unit takes damage

Is that what you wanted, if so, do you need anything else?
 

Somatic

You can change this now in User CP.
Reaction score
84
Well, thats not really what i wanted, what i need is a leakless method of detecting if a unit has make an attack successfully, then minusing 1 mana off the target. And when its mana is 0 it will be forced to 'reload'. I hope thats easy to understand enough, but still thanks anyway for the help.
 

Icyculyr

I'm a Mac
Reaction score
68
That will work, when you attack, if you miss, the actions are not run, if you hit (dealing damage from 0+) it will run he actions.

Therefore



Code:
[B]MyTrigger[/B]
Events
    (Added fro below)
Conditions
Actions
    If/Then/Else - Multiple Functions
        If - Conditions
            Current Mana of Damage Source Greater Than 0
        Then - Actions
            Set Current Mana of Damage Source = Current Mana of Damage Source - 1
        Else - Actions
            'Force to reload here


Code:
[B]Setup[/B]
Events
    A unit enters playable map area
Conditions
Actions
   Add to MyTrigger the event Triggering Unit takes damage

Now is that better?
 

Somatic

You can change this now in User CP.
Reaction score
84
But will that not leak? I need assurance for my map is a Sandbox Style, it has tons of units running it all the time. If it lags and leaks, by the 10th minute everyone will die of Severspliting.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
What you can do is set the unit's damage to 0-0.

Give it an ability like Fire Arrow or Cold Arrow, so it takes mana every time it shoots. If it has no mana it won't shoot. Viola no triggers.

But it might look... "Unproffesional" BUT you can Give/Take ability so it can be different types of weapons.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Are you able to set damage to 0? I was under the impression that if you tried to do that, it removes the ability to attack altogether.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Oh yeah... forgot that...
Then my plan might not work :(
 

Somatic

You can change this now in User CP.
Reaction score
84
Well I cant possible follow esb's method. Leaks wise i am just trying to be sure as my system is a weak one. I'll try to read up on the system at home later on. My office stops me from accessing it.
 
B

BlAd3_DrAg0n

Guest
You could like make clips that are a perishble item that when you pick up automaticly adds 10 mana or ones with multible charges so like a ammo box and when you pick up automaticly used or if at full mana goes in inventory?
 

Fatmankev

Chef, Writer, and Midnight Toker
Reaction score
240
Are you able to set damage to 0? I was under the impression that if you tried to do that, it removes the ability to attack altogether.

I believe that if you just set the damage bonus to -1, sides per dice to 1 and number of dice to 1 then the damage will be 0-0 and it will still attack. I don't even know if this is what Blade is looking for, though, so sorry if I wasted anyone's time.
 

Somatic

You can change this now in User CP.
Reaction score
84
To Blade - Its a Sandbox Style Map, thus the units must automatically "Reload" And pratically all units in my map Needs to Reload. So That method eventhought is not usable on my map but thanks for the help anyway. =)
To FatMan - Well, Your not wasting others time but yours =X Just Joking
 

Icyculyr

I'm a Mac
Reaction score
68
My code has no leaks.

Code:
[B]MyTrigger[/B]
Events
    (Added fro below)
Conditions
Actions
    If/Then/Else - Multiple Functions
        If - Conditions
            Current Mana of Damage Source Greater Than 0
        Then - Actions
            Set Current Mana of Damage Source = Current Mana of Damage Source - 1
        Else - Actions
            'Force to reload here


Code:
[B]Setup[/B]
Events
    A unit enters playable map area
Conditions
Actions
   Add to MyTrigger the event Triggering Unit takes damage

Anything else you want added to it?
 
P

PeppeJ

Guest
Set the units mana to Ex: 100
Then set attack to 0-0
Copy Searing Arrows Remove the picture set the damage to -Your Amount-
Put it in Abilities - Hero
and Abilities - Default Active Ability

Then it should work as Ammo

(This is not tested)

//PeppeJ
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top