Mana regen skill based on int? Trigger help

sicpher

New Member
Reaction score
0
Hi i have an idea for this spell but i don't know how to apply it using triggers, please help me.

Unit with 200 INT

Unit casts 'Active' spell on self that increases mana regeneration by 0.5% / 1% / 1.5% of total INT every X second for 30 seconds.
 
bump....

because this is a core spell (if it's made possible from trigger) of my range class, that's why i really need help =]
 
You can only bump once in 24 hours btw.

Can't you just add mana to a unit based on their intelligence?


Just make a periodic trigger that takes their int and gives them mana if they have the buff.
 
Im not sure if theres a easy'r way of doing this but this is my own solution:

First of all you will need an active ability that gives a buff, something like Beserk or something I think would do fine.

Trigger:
  • Arcane Meditation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Meditation
    • Actions
      • Trigger - Turn on Arcane Meditation 2 <gen>


Trigger:
  • Arcane Meditation 2
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set MM_Hero = (Units in (Entire map) matching (((Matching unit) has buff Arcane Meditation) Equal to True))
      • Unit Group - Pick every unit in MM_Hero and do (Actions)
        • Loop - Actions
          • Set MM_Int[1] = ((Intelligence of (Picked unit) (Include bonuses)) / 2)
          • Set MM_Int[2] = (Intelligence of (Picked unit) (Include bonuses))
          • Set MM_Int[3] = (MM_Int[1] + MM_Int[2])
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + (Real(MM_Int[(Level of Arcane Meditation for (Picked unit))])))
      • Custom script: call DestroyGroup(bj_MM_Hero)


Just so you know the whole MM_Int[1] = blahblah, MM_Int[2] = blahblah and MM_Int[3] = (MM_Int[1] + MM_Int[2]).
Thats because I couldnt think of any way of doing this in a formula with Int / abilty level or something so I did it like this ... works just as well I'd say :p

MM_Int is an Intreger Variable with an array.
MM_Hero is an Unit Group Variable
Arcane Meditation is the abiltiy ... I thought this would be a nice name for itxD (stolefromthemagetalentsinWoW :O)
- Base it off something like beserk without any bonusses ... for an abiltiy like this Id remove the mana cost also xD.
Arcane Meditation is also a buff ... I forgot to give it a different name so it wouldnt be confusing.


I have not tested this yet, but my PC takes about 10 minutes to load a map so I prefer not to test it myself. xD
Sorry about that.
 
You can only bump once in 24 hours btw.

Can't you just add mana to a unit based on their intelligence?


Just make a periodic trigger that takes their int and gives them mana if they have the buff.

Personally I would not use that method, because Buff checking is not very accurate.
 
BUMP ?!

I don't know how many times I've told new people here:
Don't bump/double post withn 24 hours !

There are rules in this forum, please read them !
(Sorry for this "outbrake" but I'm getting very tired of it ! :()

Anyways, to your problem, here's a version which uses custom value (Use it if you're not using unit's custom value for other stuff) :
Trigger:
  • Int Regeneration
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Unit - Set the custom value of (Triggering unit) to 30
      • Unit Group - Add (Triggering unit) to Periodic_Group


Trigger:
  • Int Periodic
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Animate Dead for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Picked unit)) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
            • Else - Actions


And here we use hashtables:
Trigger:
  • Int Regen Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TempHash = (Last created hashtable)


Trigger:
  • Int Regeneration Hash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Hashtable - Save 30 as 1 of Key (Triggering unit) in TempHash
      • Unit Group - Add (Triggering unit) to Periodic_Group


Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempInt = (Load 1 of Key (Picked unit) from TempHash)
          • Hashtable - Clear all child hashtables of child 1 in TempHash
          • Hashtable - Save (TempInt - 1) as 1 of Key (Picked unit) in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Your_Ability for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
              • Hashtable - Clear TempHash
            • Else - Actions


I think those should work :S
(Hashtables don't really work that good on Newge, but I hope that reads correct XD)
 
Naw I thought I was all cool and helpfull with my little post and than I noticed Komaqtion's post and was all like: <,<

But might I ask something ... it doesn't realy have anything to do with this subject I guess and I aint the creator of this threat but ...
What exactly is a hashtable? I noticed those were new in that patch but never understood what they do.
 
I'd simply suggest you read on it :p

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/

But basically it's faster gamecache...
Though you might not know what that is either XD

Well, it's just like a variable which can handle several values inside other values... It's almost like structs, though not vJASS and easier to access from the outside ;)

Anyways, read that tutorial and you should understand a bit more at least ;)
 
Yeah, XD Sorry it was supposed to be this:
Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempInt = (Load 1 of 0 from TempHash)
          • Hashtable - Clear all child hashtables of child Key (Picked unit) in TempHash
          • Hashtable - Save (TempInt - 1) as 1 of 0 in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Animate Dead for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
              • Hashtable - Clear all child hashtables of child Key (Picked unit) in TempHash
            • Else - Actions


;)
 
Now it's even less MUI... You are loading and saving one value for every unit, not one value per unit, but just one value overall... So now if 30 people cast this spell, they each only get one tick of it...

EDIT: Here, since you're taking forever reading that global hashtable thread, I'ma fix this for you:

Trigger:
  • Int Regen Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TempHash = (Last created hashtable)


Trigger:
  • Int Regeneration Hash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Hashtable - Save 30 as 1 of Key (Triggering unit) in TempHash
      • Unit Group - Add (Triggering unit) to Periodic_Group
      • Trigger - Turn on Int Periodic Hash&lt;gen&gt;


Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempBool = False
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempBool = True
          • Set TempInt = (Load 1 of Key (Picked unit) from TempHash)
          • Hashtable - Save (TempInt - 1) as 1 of Key (Picked unit) in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Your_Ability for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempBool Equal to False
        • Then - Actions
          • Hashtable - Clear TempHash
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
alternitively you can make the spell give a buff to the caster and detect everyone that has the buff every second (then restore mana using picked unit as your "unit")

edit, didnt see post #5
but, why isnt buff checking accurate?
 
Thanks for all the helpful replies+triggers, and I PROMISE, i will read the rules before i post next time! cheers! :thup:
 
Now it's even less MUI... You are loading and saving one value for every unit, not one value per unit, but just one value overall... So now if 30 people cast this spell, they each only get one tick of it...

EDIT: Here, since you're taking forever reading that global hashtable thread, I'ma fix this for you:

Trigger:
  • Int Regen Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TempHash = (Last created hashtable)


Trigger:
  • Int Regeneration Hash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_Ability
    • Actions
      • Hashtable - Save 30 as 1 of Key (Triggering unit) in TempHash
      • Unit Group - Add (Triggering unit) to Periodic_Group
      • Trigger - Turn on Int Periodic Hash&lt;gen&gt;


Trigger:
  • Int Periodic Hash
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempBool = False
      • Unit Group - Pick every unit in Periodic_Group and do (Actions)
        • Loop - Actions
          • Set TempBool = True
          • Set TempInt = (Load 1 of Key (Picked unit) from TempHash)
          • Hashtable - Save (TempInt - 1) as 1 of Key (Picked unit) in TempHash
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + ((Real((Intelligence of (Picked unit) (Exclude bonuses)))) x (0.05 x (Real((Level of Your_Ability for (Picked unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempInt - 1) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Periodic_Group
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempBool Equal to False
        • Then - Actions
          • Hashtable - Clear TempHash
          • Trigger - Turn off (This trigger)
        • Else - Actions





I have 1 problem with this trigger, the "Cooldown" on the spell does not work if this trigger is active . I based my spell on Roar
 
I have 1 problem with this trigger, the "Cooldown" on the spell does not work if this trigger is active . I based my spell on Roar

wat.
I have no idea how your spell could not have a cooldown if this trigger is active, it doesn't pause the unit, order it to stop, reset the cooldown, or re-add the skill(no idea if that would cause it anyway...)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I'm now realizing I could have cut out like 99% of this print and it would have been fine cuz I just need to see if a frame will fit over an LCD
  • Varine Varine:
    Oh well
  • Varine Varine:
    I'm not an engineer
  • Varine Varine:
    Although this filament is kind of expensive, I should probably be a bit more wary of that.
  • The Helper The Helper:
    I love the whole concept of 3D Printers and am very happy you have one so I can hear about them
  • The Helper The Helper:
  • Varine Varine:
    I have a couple of them, but I only have room for one to be set up at the moment
  • Varine Varine:
    So I picked the biggest one. When I bought it, I didn't realize that they used a lot of proprietary parts. So, I want to use these Volcano nozzles that are really cheap and easy to find instead of what they have, which are like, modified Volcano nozzles
  • Varine Varine:
    They are just a little bit longer than the regular ones. Like, we're talking .5mm or some shit. But that little bit makes the nozzle just long enough to extrude past the rest of the hardware on the extrusion system, I can't find my notes on it but I think it's like a .25mm gap from the end of the nozzle to the bed mesh sensor. Very small.
  • Varine Varine:
    So I bought a bunch of different parts to try and figure out how to make this work, and in the process changed some of the electrical components like the thermistors, but never got around to figuring out how to make the firmware account for the different hardware. Resulting in it not interpreting the voltage change to mean that the thermistor was above temperature, so it didn't shut off the heating core and it just kept pumping heat out
  • Varine Varine:
    I have most of the stuff I need to build an enclosure so I can heat the chamber for different plastics that need to have a pretty consistent temperature through the whole model, and then I can get my other ones set up too. I have a shitty Ender but that one is super easy to modify, but it's also very outdated and kind of a nightmare to work with. I think I'm going to cannibalize it for parts and just run my big one and another little one.
  • Varine Varine:
    I think I solved my problem with digitizing reels tho!
  • Varine Varine:
    Like Super 8 reels. Actual equipment to do it is like, thousands and thousands of dollars, and the cheap ones are useless, so I'm trying to build one so I can just use the same camera I use for slides and negatives. Much cheaper
  • Varine Varine:
    Anyway, it kind of works, but the take up reel is kind of tricky because you need to spin it directly to wind the tape onto it. And as it fills, you need to slow it down, and that's kind of complicated. More complicated than I wanted to try and account for, anyway.
  • Varine Varine:
    So I have the first motor that has gearing pull it from the original reel, through a set of pullies to keep some tension, and then a second motor synced with the first to guide it through the projection port so I can capture the images
  • Varine Varine:
    All that's easy enough, I just need to make sure I don't get too much force onto the film itself so I don't accidentally tear it.
  • Varine Varine:
    Then I think my solution to the take up reel is to have a kind of dancing lever on a spring in between two limit switches
  • Varine Varine:
    So, as the tape comes towards the take up reel and makes slack, that lever is pulled up by a spring to keep the tension on the film, it hits a limit switch to engage the take up reel motor at some point, and as that winds in the film, the film pushes the lever back down to a second limit switch to disengage the motor again. Slack builds up, spring pulls it back, ad infinitum
  • Varine Varine:
    Well, until the reel is empty anyway.
  • Varine Varine:
    I'm guessing it's going to be much harder than I feel like it is going to be right now, but I think it's a pretty elegant solution that doesn't rely on software to control it. The less software I need to use the better
  • Varine Varine:
    I'm just not a very good programmer, as much as I want to be I suck at it
  • The Helper The Helper:
    Programming that printer is going to be similar to programming a big machine like in a machine shop. There is good money in programming CNC machines.
  • The Helper The Helper:
    +1
  • Varine Varine:
    They are pretty similar, but this one is much less involved than a real CNC. A lot less moving parts
    +1
  • The Helper The Helper:
    Happy Monday!

      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