Loops replacing each other second time used

FroznYoghurt

New Member
Reaction score
37
OK im stuck in deep shit and im clueless bout what do >.<'

The problem is unlike anything ive ever seen :Z, A spell that uses two different but yet pretty similar periodic time trigger loops, one in the beginning and one inte the end. The second loop checks for a condition to also end the spell, and the problem is...
The second time the spell is used the second trigger is ("%?!!+"? used first! wich ends the spell instantly!:banghead: Ive searched the triggers with spyglass but been unable to find anything... :confused:

If you got anything il shower you with rep...

If you want me to be more specific ask me to be more specific ;)
Altought its thought to be a spell pack so id rather not give away the whole triggers but il do if necessary
 

FroznYoghurt

New Member
Reaction score
37
awww... guess i have no choice then... but be hush-hush bout it! want this spell pack to turn out good :rolleyes:
The spookiest part is that it now starts malfunction randomly, not specificly the second time :<
ah well... prepare for some reading...

The "main" trigger
Code:
[The spells name] Ini
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to [The spells name]
    Actions
        -------- Animation  + Variables --------
        Set Caster = (Triggering unit)
        Set Destination_Point = (Target_loc offset by 900.00 towards (Facing of Caster) degrees)
        Animation - Play Caster's Stand Victory animation
        Animation - Change Caster's animation speed to 150.00% of its original speed
        Wait 0.75 seconds
        -------- Temporary Special Effect --------
        Special Effect - Create a special effect attached to the chest of Caster using a special effect :P
        Special Effect - Destroy (Last created special effect)
        -------- Freeze --------
        Animation - Change Caster's animation speed to 0.00% of its original speed
        -------- Summon --------
        Set TempPoint = (Position of Caster)
        Unit - Create 1 Summoned Unit for (Owner of Caster) at TempPoint facing (Facing of Caster) degrees
        Set Summon = (Last created unit)
        Unit - Add a 15.00 second Generic expiration timer to Summon
        Animation - Play Summon's Walk animation
        Unit - Turn collision for Summon Off
        Custom script:   call RemoveLocation(udg_TempPoint)
        -------- Loop --------
        Trigger - Turn on Entering Loop <gen>
        -------- Loop Duration --------
        Wait 0.16 seconds
        -------- Loop Ends --------
        Trigger - Turn off Entering Loop <gen>
        Unit - Turn collision for Summon On
        -------- Duration of The Spell --------
        Wait 14.84 seconds
        -------- Spell Ends --------
        Animation - Change Caster's animation speed to 100.00% of its original speed
        Set Target_loc = (Position of Summon)
        Set Target_Loc2 = (Position of Caster)        
        Unit - Remove Summon from the game
        Unit - Create 1 Wrath for (Owner of Caster) at Target_loc facing Target_Loc2
        Set Summon = (Last created unit)
        Unit - Turn collision for Summon Off
        Custom script:   call RemoveLocation(udg_Target_loc)
        Custom script:   call RemoveLocation(udg_Target_Loc2)
        -------- Loop --------
        Trigger - Turn on Finishing Leap Loop <gen>
        -------- Loop Duration --------
        Wait until (CustomBoolean Equal to True), checking every 0.10 seconds
        -------- Loop Ends --------
        Trigger - Turn off Finishing Leap Loop <gen>
        Set CustomBoolean = False

Loop #1

Code:
Entering Loop
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Target_loc = (Position of Summon)
        Set Target_Loc2 = (Target_loc offset by 30.00 towards (Angle from Target_loc to Destination_Point) degrees)
        Unit - Move Summon instantly to Target_Loc2
        Custom script:   call RemoveLocation(udg_Target_loc)
        Custom script:   call RemoveLocation(udg_Target_Loc2)

Loop #2
Code:
Finishing Leap Loop
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set TempPoint = (Position of Caster)
        Set Target_loc = (Position of Summon)
        Set Target_Loc2 = (Target_loc offset by 30.00 towards (Angle from Target_loc to TempPoint) degrees)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between TempPoint and Target_loc) Greater than 10.00
            Then - Actions
                Unit - Move Summon instantly to Target_Loc2
                Custom script:   call RemoveLocation(udg_TempPoint)
                Custom script:   call RemoveLocation(udg_Target_loc)
                Custom script:   call RemoveLocation(udg_Target_Loc2)
            Else - Actions
                Set CustomBoolean = True
                Unit - Remove Summon from the game
                Special Effect - Create a special effect attached to the chest of Caster using a special effect
                Special Effect - Destroy (Last created special effect)
                Custom script:   call RemoveLocation(udg_TempPoint)
                Custom script:   call RemoveLocation(udg_Target_loc)
                Custom script:   call RemoveLocation(udg_Target_Loc2)
you read this far? :O
Thx in advantage ;)
 

ShadowTek

New Member
Reaction score
23
I see that you are somehow waiting for the CustomBoolean to be true at a point in the main trigger, but I don't see where you ever set it to true. You set it to false at the end of the first trigger, but thats all I see of it.

I hope you aren't trying to use this for more than one unit at a time. If so, then I don't see how this could work since you are using the same globals for everything (such as "Caster").
 

FroznYoghurt

New Member
Reaction score
37
True, i have yet not mastered the art of MUI
And ops, i did forget to change the Variable in the post, changed the name to "CustomVariable" trying not to give the slightest bit away :>
 

NapaHero

Back from the dead...
Reaction score
43
Just a few errors there:

Code:
-------- [COLOR="green"](From here)[/COLOR] Summon --------
        Set TempPoint = (Position of Caster)
        Unit - Create 1 Summoned Unit for (Owner of Caster) at TempPoint facing (Facing of Caster) degrees
        Set Summon = (Last created unit)
        Unit - Add a 15.00 second Generic expiration timer to Summon
        Animation - Play Summon's Walk animation
        Unit - Turn collision for Summon Off
        Custom script:   call RemoveLocation(udg_TempPoint)
        -------- Loop --------
        Trigger - Turn on Entering Loop <gen>
        -------- Loop Duration --------
        Wait 0.16 seconds
        -------- Loop Ends --------
        Trigger - Turn off Entering Loop <gen>
        Unit - Turn collision for Summon On
        -------- [COLOR="green"](To here, is okay)[/COLOR] Duration of The Spell --------
        Wait 14.84 seconds
        -------- [COLOR="green"](This is where start the problems)[/COLOR] Spell Ends --------
        Animation - Change Caster's animation speed to 100.00% of its original speed
        [B]Unit - Remove Summon from the game[/B] [COLOR="green"]Why you need this? You already used a expiration timer that will remove the unit[/COLOR]
        [B]Set Target_loc = (Position of Summon)[/B] [COLOR="green"]Can you tell me where's Summon? It already has been removed[/COLOR]
        Set Target_Loc2 = (Position of Caster)
        Unit - Create 1 Wrath for (Owner of Caster) at [B]Target_loc[/B] facing Target_Loc2 [COLOR="green"]Where's Loc?[/COLOR]
        [B]Set Summon = (Last created unit)[/B] [COLOR="green"]Here's you back, but why haven't you received a Expiration Timer? You leaks if not removed.[/COLOR]
        Unit - Turn collision for Summon Off
        [B]Animation - Change Caster's animation speed to 100.00% of its original speed[/B] [COLOR="green"]Again? You already used this above[/COLOR]
        Custom script:   call RemoveLocation(udg_Target_loc)
        Custom script:   call RemoveLocation(udg_Target_Loc2)
        -------- Loop --------
        Trigger - Turn on Finishing Leap Loop <gen>
        -------- Loop Duration --------
        Wait until (CustomBoolean Equal to True), checking every 0.10 seconds
        -------- Loop Ends --------
        Trigger - Turn off Finishing Leap Loop <gen>
        Set CustomBoolean = False

You really should fix these.
 

FroznYoghurt

New Member
Reaction score
37
Quite a sharp eye you got there :) or its me thats half-blind, havent slept much lately, i blame that for now xD.

OK the double reset ani speed is plain stupid, fixed now
The reason for removal of Summoned is that i dont want its death animation to be played, instead i want it to dissapear.
The placing of "position of unit" fixed :> thought i fixed that earlier

And i dont quite get how it leaks if i dont have expiration timer :O

+rep though
 

NapaHero

Back from the dead...
Reaction score
43
The reason for removal of Summoned is that i dont want its death animation to be played, instead i want it to dissapear.
And i dont quite get how it leaks if i dont have expiration timer :O

1 - Then don't put an Expiration Timer

2 - More units ingame = More lag. You don't want that, do you?

Thanks for +rep :)
 

FroznYoghurt

New Member
Reaction score
37
The second unit is removed in the second loop so it dosent need an expiration timer, the second unit is mostly an "SFX unit"

The Expiration Timer on the first unit is there only for graphical reasons, to help the caster to keep track of the spell duration.

And the problem is still rock solid, the second loop is randomly triggered instead of the first one. :banghead:

Consider this partially a bump. :cool:
 

NapaHero

Back from the dead...
Reaction score
43
Code:
Entering Loop
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Target_loc = (Position of Summon)
        Set Target_Loc2 = (Target_loc offset by 30.00 towards (Angle from Target_loc to Destination_Point) degrees)
        Unit - Move Summon instantly to Target_Loc2
        Custom script:   call RemoveLocation(udg_Target_loc)
        Custom script:   call RemoveLocation(udg_Target_Loc2)

I'm still wondering where you set Destination_Point. Oh, since it's a point, leaks and you don't remove it. Maybe this is the awnser for your problems? :p
 

FroznYoghurt

New Member
Reaction score
37
I did forget to remove the location... :cool: but since its not in a loop its hardly gonna cause major lag.

The variable is set in the beginning of the first trigger though.
Set Destination_Point = (Target_loc offset by 900.00 towards (Facing of Caster) degrees)
 
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