Mana Freeze ?

zero9x

Active Member
Reaction score
1
I saw a skill that will: reduce all mana of Target Unit and return it after few seconds. (Return 90/85/80/75% of the mana lost)

But i dont know how to do it, i tried to make this trigger, thats
Set: Temp_Real = Mana of Target Unit
Set mana of target unit = Temp_Real - Temp_Real
Wait 1.75/2/2.25/2.5 seconds
Set mana of Target Unit = Temp_Real + (Temp_Real x ((0.95 - 0.05 x Real Lv of Ability)))

But it isnt work, can u guys help me to make this skill with MUI?

Hope this spell will useful to some one:

Target a unit, cause it lose all mana, return 90/85/80/75% of the mana to that unit after 1.75/2.5/3.25/4s.

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Mana Freeze
    • Actions
      • Custom Script: local unit u = GetSpellTargetUnit()
      • Custom Script: local real delay = 1.00 + ( 0.75 * I2R(GetUnitAbilityLevelSwapped('XXXX', GetTriggerUnit()) ) )
      • Custom Script: local real mana = GetUnitStateSwap(UNIT_STATE_MANA, u) * ( 0.95 - ( 0.05 * I2R(GetUnitAbilityLevelSwapped('XXXX', GetTriggerUnit()) ) ) )
      • Custom Script: if ( GetUnitStateSwap(UNIT_STATE_MANA, u) > 0.00) then
      • Custom Script: call SetUnitManaBJ( u, 0.00 )
      • Custom Script: call TriggerSleepAction( delay )
      • Custom Script: call SetUnitManaBJ( u, mana )
      • Custom Script: endif
      • Custom Script: set u = null

change XXXX with the ability ID of mana freeze

Done by jnZ
 

jnZ

I
Reaction score
64
Set mana of target unit = Temp_Real - Temp_Real
- why not just set it to 0?

Set mana of Target Unit = Temp_Real + (Temp_Real x ((0.95 - 0.05 x Real Lv of Ability)))
- you want the unit to end up with 90/85/80/75% of its original mana right? so why are you increasing the mana of the unit? Remove the Temp_Real at the start of the addition.
 

zero9x

Active Member
Reaction score
1
For example:
If unit has 500/1000 mana, when i use this to that unit, remove all mana (equal = 0) and after few seconds, it will return 490/425/400/375 mana to that unit.

Can u help me plz?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
(Target unit of ability being cast) doesn't work after waits. Create a local variable to refer to the target, and another to refer to the original amount of mana (in case the ability gets cast again during the wait).
 

jnZ

I
Reaction score
64
like i said. in that case i don't understand why you are doing this:
Code:
Set mana of Target Unit = Temp_Real + (Temp_Real x ((0.95 - 0.05 x Real Lv of Ability)))
in the example with 500 mana that would set the units mana to
500 + 490 = 990
so remove the Temp_Real at the start of the addition.

just create a variable like you did with Temp_Real. Variably type unit and name it Temp_Unit for example.
at the beginning of your trigger set Temp_Unit to:
Code:
set Temp_Unit to Target Unit

and always use Temp_Unit instead of Target Unit in the rest of your trigger
 

zero9x

Active Member
Reaction score
1
Here is my trigger, my brother made it for me, but it isnt MUI, can u guys help me to "MUI" it plz :)

Target 1 enemy unit, cause it lose all mana and after few seconds, return the mana to that unit:
Level 1 - Return 90% mana, last 1,75s
Level 2 - Return 85% mana, last 2.5s
Level 3 - Return 80% mana, last 3.25s
Level 4 - Return 75% mana, last 4s.

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Mana Freeze
    • Actions
      • Set AAUnit = (Target unit of ability being cast)
      • Set AAInteger = (Integer((1.00 + (0.75 x (Real((Level of Mana Freeze for (Triggering unit))))))))
      • Set AAReal = ((Mana of AAUnit) x ((95.00 - (5.00 - (Real(AAInteger)))) / 100.00))
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Max mana of AAUnit) Less than or equal to (<=) 0.00
          • Then - Actions
            • Do nothing
          • Else - Actions
            • Unit - Set mana of AAUnit to 0.00
            • Countdown Timer - Start AATimer as a One-shot timer that will expire in (Real(AAInteger)) seconds


Trigger:
  • Events
    • Time - AATimer expires
    • Conditions
    • Actions
      • Unit - Set mana of AAUnit to ((Mana of AAUnit) + AAReal)
 

jnZ

I
Reaction score
64
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Mana Freeze
    • Actions
      • Custom Script: local unit u = GetSpellTargetUnit()
      • Custom Script: local real delay = 1.00 + ( 0.75 * I2R(GetUnitAbilityLevelSwapped('XXXX', u) ) )
      • Custom Script: local real mana = GetUnitStateSwap(UNIT_STATE_MANA, u) * ( 0.95 - ( 0.05 * I2R(GetUnitAbilityLevelSwapped('XXXX', u) ) ) )
      • Custom Script: if ( GetUnitStateSwap(UNIT_STATE_MANA, u) > 0.00) then
        • Custom Script: call SetUnitManaBJ( u, 0.00 )
        • Custom Script: call TriggerSleepAction( delay )
        • Custom Script: call SetUnitManaBJ( u, mana )
      • Custom Script: endif
      • Custom Script: set u = null


change XXXX with the ability ID of mana freeze

EDIT: fixed :>
 

jnZ

I
Reaction score
64
what do you mean? thats perfectly fine. it won't move the actions inside the then bracket slightly to the right like it does here in the forums. if thats what you mean
 

zero9x

Active Member
Reaction score
1
I tested, and found something:

The mana will return to that unit after 1.75s in all level
And that unit always lost 90% of it mana in all level

can u help me to fix that? My ability's raw code is A06X, i dunno what happened...
 

jnZ

I
Reaction score
64
oh yeah now that you mention it the flaw is obvious. it checks for the level of mana freeze at the targeted unit. but thats obviously wrong.

change:
Code:
Custom Script: local real delay = 1.00 + ( 0.75 * I2R(GetUnitAbilityLevelSwapped('XXXX', u) ) )
Custom Script: local real mana = GetUnitStateSwap(UNIT_STATE_MANA, u) * ( 0.95 - ( 0.05 * I2R(GetUnitAbilityLevelSwapped('XXXX', u) ) ) )

to:
Code:
Custom Script: local real delay = 1.00 + ( 0.75 * I2R(GetUnitAbilityLevelSwapped('XXXX', GetTriggerUnit()) ) )
Custom Script: local real mana = GetUnitStateSwap(UNIT_STATE_MANA, u) * ( 0.95 - ( 0.05 * I2R(GetUnitAbilityLevelSwapped('XXXX', GetTriggerUnit()) ) ) )

sorry about that
 

zero9x

Active Member
Reaction score
1
Worked, and one think i wanna say is: Perfect!

Thanks for helped me, jnZ xD
 

jnZ

I
Reaction score
64
you are welcome.

but you didn't say it like that because you just read my message in the chatbox right? :D
 

jnZ

I
Reaction score
64
if you are logged in and on the forum tab there should be a chatbox at the top of the site.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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