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
 
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 ;)
 
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").
 
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 :>
 
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.
 
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
 
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 :)
 
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:
 
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
 
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.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top