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
889
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
889
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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