Insane TriggeringProblem (not that insane :)) With MultiJumping..

ZeldaFan

New Member
Reaction score
1
So i made a "Throwing" Trigger based off Jump spell in assassin pack off wc3sear.ch.


Trigger picks every unit hero nonhostile in region and start the throwing to a defined region destination.

It works perfect with one unit, but with other units in, they all get the flying height to maximum and dont move except one.

So i decided to array all my throwing variables to point on the picked unit number (because throwing the same "moving loop" for each unit simulteanously caused the problem i thought) and no change whatsoever, it got worse really :)


Before i bore the site to tears with my sad GUI triggers :D :cool: Has anyone done something like this ? MultiThrowing on picked players from group

That would spare me at least 2 weeks of brainstorming and keyboard bashing with a hammer :p
 

SFilip

Gone but not forgotten
Reaction score
634
can you post the trigger please?
 

ZeldaFan

New Member
Reaction score
1
I have to say im on the verge of having a workable solution.. So far all the units are getting tossed.. Problem is, starting 2 units, they make some kinda u-turn mid-air (Because i have 4 destination regions and had to pick a random one for each picked unit but the second one trumps the other it seems).

Lastly i cant remove trail special effects when there is more than 1 unit.

Anyway here are the original triggers from assassin pack

Code:
Jump
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Jump 
    Actions
        Set JumpCaster = (Casting unit)
        Set JumpCasterPoint = (Position of (Casting unit))
        Set JumpTargetPoint = (Target point of ability being cast)
        Unit - Pause JumpCaster
        Unit - Turn collision for JumpCaster Off
        Unit - Make JumpCaster Invulnerable
        Special Effect - Create a special effect attached to the right hand of JumpCaster using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
        Set JumpTrailEffects[0] = (Last created special effect)
        Special Effect - Create a special effect attached to the left hand of JumpCaster using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
        Set JumpTrailEffects[1] = (Last created special effect)
        Unit - Add Crow Form to JumpCaster
        Animation - Change JumpCaster's animation speed to 50.00% of its original speed
        Animation - Play JumpCaster's spell slam animation
        Trigger - Turn on JumpFlyLoop <gen>
        Animation - Change JumpCaster flying height to 750.00 at 750.00
        Wait 0.50 seconds
        Animation - Change JumpCaster flying height to 0.00 at 750.00
        Wait 0.30 seconds
        Animation - Change JumpCaster's animation speed to 100.00% of its original speed
        Animation - Reset JumpCaster's animation
        Trigger - Turn off JumpFlyLoop <gen>
        Wait 0.05 seconds
        Trigger - Run JumpStomping <gen> (ignoring conditions)
        Unit - Remove Crow Form from JumpCaster
        Unit - Unpause JumpCaster
        Unit - Turn collision for JumpCaster On
        Unit - Make JumpCaster Vulnerable
        Custom script:   call RemoveLocation(udg_JumpTargetPoint)
        Custom script:   call RemoveLocation(udg_JumpCasterPoint)
        Set JumpCaster = No unit
        Special Effect - Destroy JumpTrailEffects[0]
        Special Effect - Destroy JumpTrailEffects[1]
        Wait 0.25 seconds
        Special Effect - Destroy StomperEffect

Code:
JumpFlyLoop
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set JumpSecSecPoint = (Position of JumpCaster)
        Set JumpSecPoint = (JumpSecSecPoint offset by ((Distance between JumpCasterPoint and JumpTargetPoint) / 110.00) towards (Angle from JumpCasterPoint to JumpTargetPoint) degrees)
        Unit - Move JumpCaster instantly to JumpSecPoint, facing (Angle from JumpCasterPoint to JumpTargetPoint) degrees
        Custom script:   call RemoveLocation(udg_JumpSecPoint)
        Custom script:   call RemoveLocation(udg_JumpSecSecPoint)

Code:
JumpStomping
    Events
    Conditions
    Actions
        Set StomperPoint = (Position of JumpCaster)
        Unit - Create 1 Stomper Dummy for (Owner of JumpCaster) at StomperPoint facing Default building facing degrees
        Special Effect - Create a special effect at StomperPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Custom script:   call RemoveLocation(udg_StomperPoint)
        Set StomperEffect = (Last created special effect)
        If ((Level of Jump  for JumpCaster) Equal to 1) then do (Unit - Add Stomping lvl 1  to (Last created unit)) else do (Do nothing)
        If ((Level of Jump  for JumpCaster) Equal to 2) then do (Unit - Add Stomping lvl 2  to (Last created unit)) else do (Do nothing)
        If ((Level of Jump  for JumpCaster) Equal to 3) then do (Unit - Add Stomping lvl 3  to (Last created unit)) else do (Do nothing)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Human Mountain King - Thunder Clap


Basically i segmented the Base Jump (renamed ofc) to check if JumpLoop had already started.

I ve put a "For each units in region matching condition" loop in the JumpLoop trigger, which worked.

I still dont see how to make them arrive at different locations, nor how to remove their special effects.. Intricate loops here. I need some more finesse to deal with that :shades:


*Holy Moly* I made the random destinations work ! Now the trail special effects.. Cya in 6 months lol. I hope one of you comes up with a nice code to do the same cus my triggers look like Windows95 source
 

ZeldaFan

New Member
Reaction score
1
After dealing with a couple of other triggers i made the correct version for what i wanted. Just Create Arrays for your Units, StartingLocations of Units, Special Effects and make the whole thing roll in "INTEGER A" Type Loops..

Neat and simple

The problem was caused indeed by the Waiting functions so you have to separate your loops with those ones.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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