Yet another MUI problem

bessomi

New Member
Reaction score
9
Hello.

I am so sorry for double posting like this but i really need help.

I have a spell which uses 3 triggers, and i figured out a way to make it an MUI spell. It is not using any waits so this should be quite easy i thought.
WRONG
After i tried making it an MUI spell, the whole spell failed.
But the good news is that i know what the problem is, i think.
And i don't know how to solve it.

First trigger
Code:
Hells Judgement
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Hells judjement 
        (Percentage life of (Target unit of ability being cast)) Greater than or equal to 90.00
        (Percentage life of (Casting unit)) Greater than or equal to 90.00
    Actions
        Set IntegerA = (IntegerA + 1)
        Set Hell_Boolean[IntegerA] = True
        Set Unit_Victim[IntegerA] = (Target unit of ability being cast)
        Set Unit_Caster[IntegerA] = (Casting unit)
        Set Point1[IntegerA] = (Position of (Casting unit))
        Set Point2[IntegerA] = (Position of Unit_Victim[IntegerA])
        Set Integer[IntegerA] = (Random integer number between 1 and 15)
        Unit - Pause Unit_Caster[IntegerA]
        Unit - Pause Unit_Victim[IntegerA]
        Unit - Add Crow Form to Unit_Caster[IntegerA]
        Unit - Remove Crow Form from Unit_Caster[IntegerA]
        Unit - Add Crow Form to Unit_Victim[IntegerA]
        Unit - Remove Crow Form from Unit_Victim[IntegerA]
        Animation - Change Unit_Caster[IntegerA] flying height to 300.00 at 300.00
        Animation - Change Unit_Victim[IntegerA] flying height to 300.00 at 300.00
        Special Effect - Create a special effect at Point1[IntegerA] using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
        Set Special_Effect[IntegerA] = (Last created special effect)
        Special Effect - Create a special effect at Point2[IntegerA] using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
        Set Special_Effect_2[IntegerA] = (Last created special effect)
        Floating Text - Create floating text that reads String[IntegerA] above Unit_Victim[IntegerA] with Z offset 0.00, using font size 10.00, color (50.00%, 50.00%, 50.00%), and 0.00% transparency
        Set Floating_Text[IntegerA] = (Last created floating text)
        Trigger - Turn on Hells Judgement damage <gen>
        Custom script:   call RemoveLocation (udg_Point1[udg_IntegerA])
        Custom script:   call RemoveLocation (udg_Point2[udg_IntegerA])
        Countdown Timer - Start Timer[IntegerA] as a One-shot timer that will expire in (Real(Integer[IntegerA])) seconds
        Countdown Timer - Create a timer window for Timer[IntegerA] with title Hells Judgement
        Trigger - Add to Timer Expires <gen> the event (Time - Timer[IntegerA] expires)
        Set Timer_Window[IntegerA] = (Last created timer window)
Second trigger
Code:
Hells Judgement damage
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Set String[IntegerA] = ((String((Percentage life of Unit_Victim[IntegerA]))) + %)
        Floating Text - Change text of Floating_Text[IntegerA] to String[IntegerA] using font size 10.00
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Hell_Boolean[IntegerA] Equal to True
            Then - Actions
                Unit - Cause Unit_Caster[IntegerA] to damage Unit_Victim[IntegerA], dealing ((Max life of Unit_Victim[IntegerA]) x 0.01) damage of attack type Chaos and damage type Fire
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Hells judjement  for Unit_Caster[IntegerA]) Equal to 1
                    Then - Actions
                        If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to 70.00) then do (Set Hell_Boolean[IntegerA] = False) else do (Do nothing)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Hells judjement  for Unit_Caster[IntegerA]) Equal to 2
                    Then - Actions
                        If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to 60.00) then do (Set Hell_Boolean[IntegerA] = False) else do (Do nothing)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Hells judjement  for Unit_Caster[IntegerA]) Equal to 3
                    Then - Actions
                        If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to 50.00) then do (Set Hell_Boolean[IntegerA] = False) else do (Do nothing)
                    Else - Actions
                        Do nothing
            Else - Actions
                Unit - Set life of Unit_Victim[IntegerA] to (((Max life of Unit_Victim[IntegerA]) x 0.01) + (Life of Unit_Victim[IntegerA]))
        If ((Life of Unit_Victim[IntegerA]) Equal to 100.00) then do (Set Hell_Boolean[IntegerA] = True) else do (Do nothing)
Third and final trigger
Code:
Timer Expires
    Events
    Conditions
    Actions
        Countdown Timer - Destroy Timer_Window[IntegerA]
        Animation - Change Unit_Caster[IntegerA] flying height to 0.00 at 300.00
        Animation - Change Unit_Victim[IntegerA] flying height to 0.00 at 300.00
        Unit - Unpause Unit_Caster[IntegerA]
        Unit - Unpause Unit_Victim[IntegerA]
        Special Effect - Destroy Special_Effect[1]
        Special Effect - Destroy Special_Effect[2]
        Trigger - Turn off Hells Judgement damage <gen>
        Unit - Set life of Unit_Caster[IntegerA] to (Percentage life of Unit_Victim[IntegerA])

As you can see, i made all the variables to arrays and then i set the arrays to
IntegerA. Then i had IntegerA be a new number when the spell is cast. By doing that i thought that the variables would refresh themselves each time the spell is cast, as if they where brand new.
WRONG AGAIN
This is what i think is the problem.
If the spell is cast twice then the first time will use the same variables as the second one.
What this spell does is that it lifts the enemy and the caster into the air.
Then it makes the life of the "Victim" go up and down between 70% and 100%
The problem is that it stops at 100% whenever. it does not matter if i cast the spell twice with 2 different heroes, The life of "Victim" will still stop when it reaches 100%

Tell me if you need to see the map yourselves.

Thanks in return
 

Exide

I am amazingly focused right now!
Reaction score
448
I think your IntegerA variable is the problem.
But I'm not sure why. :p

Also, your conditions in the first trigger might prevent your spell from working correctly?

In the second trigger, you should try to use a loop.. -You want the trigger to run for all targets at the same time.
Also, remove every 'Do Nothing' from the second trigger, they're worthless anyway. :p
 

Flare

Stops copies me!
Reaction score
662
As it is, you are far from MUI... everytime a new instance occurs, you are only keeping track of the latest values (yes, you have all the other array values defined, but you aren't using them). You need to loop through all array values

Code:
        Trigger - Turn on Hells Judgement damage <gen>
Code:
        Trigger - Turn off Hells Judgement damage <gen>

You've ruined any chance of MUI-ness right there. Don't turn off triggers if they are available for use by separate units (or anything else for that matter).
Me said:
-THIS PART IS IMPORTANT!
---Also, you must NEVER EVER EVER turn off periodic event triggers if you plan to make MUI spells unless you intend to completely prevent everyone from using the ability. Turning off the trigger (obviously) prevents units from utilizing the effects of the periodic trigger (if a unit is sliding, and are paused for example, turning off the trigger may prevent you from unpausing the unit which can be terrible).
 

bessomi

New Member
Reaction score
9
I am glad you helped me figgure out the problem.

Any chance of helping me fix it?

Thanks in return:thup:
 

Grymlax

Probably not around
Reaction score
138
This is not something that would make your spell mui but it makes the trigger shorter.

This part of your code:
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Hells judjement  for Unit_Caster[IntegerA]) Equal to 1
                    Then - Actions
                        If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to 70.00) then do (Set Hell_Boolean[IntegerA] = False) else do (Do nothing)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Hells judjement  for Unit_Caster[IntegerA]) Equal to 2
                    Then - Actions
                        If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to 60.00) then do (Set Hell_Boolean[IntegerA] = False) else do (Do nothing)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Hells judjement  for Unit_Caster[IntegerA]) Equal to 3
                    Then - Actions
                        If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to 50.00) then do (Set Hell_Boolean[IntegerA] = False) else do (Do nothing)
                    Else - Actions
                        Do nothing

Can be simplified into this code:
Code:
If ((Percentage life of Unit_Victim[IntegerA]) Less than or equal to (80.00 - (10.00 x (Real((Level of Hells judjement for Unit_Victim[IntegerA])))))) then do (Set Hell_Boolean[(Integer A)] = False) else do (Do nothing)
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top