Telekenisis move...strange outcome.

All_Out_Mapp

Member
Reaction score
0
So... I have the system set up for Knockback.
Trigger:
  • KnockbackCall
    • Events
    • Conditions
    • Actions
      • Set KnockbackSys_Index = (KnockbackSys_Index + 1)
      • Set KnockbackSys_Unit[KnockbackSys_Index] = KnockbackCall_Unit
      • Set KnockbackSys_Dist[KnockbackSys_Index] = KnockbackCall_Dist
      • Set KnockbackSys_Angle[KnockbackSys_Index] = KnockbackCall_Angle
      • Set KnockbackSys_SFXPath[KnockbackSys_Index] = KnockbackCall_SFX
      • Set KnockbackSys_TickCount[KnockbackSys_Index] = (Integer((KnockbackCall_Dur / 0.04)))
      • Set KnockbackSys_Tick[KnockbackSys_Index] = 0
      • Set KnockbackSys_Sin[KnockbackSys_Index] = (90.00 / (Real(KnockbackSys_TickCount[KnockbackSys_Index])))
      • Set KnockbackSys_DestroyTree[KnockbackSys_Index] = KnockbackCall_DestroyTree


Trigger:
  • KnockbackExecute
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer KnockbackSys_Looper) from 1 to KnockbackSys_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KnockbackSys_Tick[KnockbackSys_Looper] Greater than KnockbackSys_TickCount[KnockbackSys_Looper]
            • Then - Actions
              • Set KnockbackSys_Index = (KnockbackSys_Index - 1)
              • For each (Integer A) from KnockbackSys_Looper to KnockbackSys_Index, do (Actions)
                • Loop - Actions
                  • Set TempInt = (Integer A)
                  • Set KnockbackSys_Unit[TempInt] = KnockbackSys_Unit[(TempInt + 1)]
                  • Set KnockbackSys_Dist[TempInt] = KnockbackSys_Dist[(TempInt + 1)]
                  • Set KnockbackSys_Angle[TempInt] = KnockbackSys_Angle[(TempInt + 1)]
                  • Set KnockbackSys_SFXPath[TempInt] = KnockbackSys_SFXPath[(TempInt + 1)]
                  • Set KnockbackSys_TickCount[TempInt] = (TempInt + 1)
                  • Set KnockbackSys_Tick[TempInt] = KnockbackSys_Tick[(TempInt + 1)]
                  • Set KnockbackSys_Sin[TempInt] = KnockbackSys_Sin[(TempInt + 1)]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KnockbackSys_Tick[KnockbackSys_Looper] Less than or equal to KnockbackSys_TickCount[KnockbackSys_Looper]
            • Then - Actions
              • Set KnockbackSys_Tick[KnockbackSys_Looper] = (KnockbackSys_Tick[KnockbackSys_Looper] + 1)
              • Set TempReal = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real((KnockbackSys_Tick[KnockbackSys_Looper] - 1)))))))
              • Set TempReal2 = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real(KnockbackSys_Tick[KnockbackSys_Looper]))))))
              • Set TempLoc = (Position of KnockbackSys_Unit[KnockbackSys_Looper])
              • Set TempLoc2 = (TempLoc offset by (TempReal2 - TempReal) towards KnockbackSys_Angle[KnockbackSys_Index] degrees)
              • Unit - Move KnockbackSys_Unit[KnockbackSys_Looper] instantly to TempLoc2
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KnockbackSys_DestroyTree[KnockbackSys_Looper] Equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within 200.00 of TempLoc2 and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KnockbackSys_SFXPath[KnockbackSys_Looper] Not equal to <Empty String>
                • Then - Actions
                  • Special Effect - Create a special effect at TempLoc2 using KnockbackSys_SFXPath[KnockbackSys_Looper]
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
              • Custom script: call RemoveLocation( udg_TempLoc )
              • Custom script: call RemoveLocation( udg_TempLoc2 )
            • Else - Actions


Just like so, i believe everything is accurate.
But when i use it in my move, although i followed an example presicely; the units all slide in one direction instead of in separate directions.
Heres my version of the move.
Trigger:
  • Kenisis
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 1
    • Actions
      • Unit - Pause (Triggering unit)
      • Set TempUnit = (Triggering unit)
      • Set TempLoc = (Position of TempUnit)
      • Set TempGroup = (Units within 500.00 of TempLoc matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True)))
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to (Triggering unit)
            • Then - Actions
              • Unit - Pause (Picked unit)
              • Unit - Add Storm Crow Form to (Picked unit)
              • Animation - Change (Picked unit) flying height to (500.00 - (Distance between (Position of (Triggering unit)) and (Position of (Picked unit)))) at 500.00
            • Else - Actions
      • Wait 3.00 seconds
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 6
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (((Real((Level of Kinetic Barrier for (Triggering unit)))) x 50.00) - 100.00) damage of attack type Spells and damage type Normal
            • Else - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (25.00 + ((Real((Level of Kinetic Barrier for (Triggering unit)))) x 25.00)) damage of attack type Spells and damage type Normal
          • Set TempLoc2 = (Position of (Picked unit))
          • Set KnockbackCall_Unit = (Picked unit)
          • Set KnockbackCall_Dur = 2.00
          • Set KnockbackCall_Dist = (500.00 - (Distance between TempLoc and TempLoc2))
          • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
          • Set KnockbackCall_SFX = Abilities\Spells\Human\Flare\FlareTarget.mdl
          • Trigger - Run KnockbackCall <gen> (ignoring conditions)
          • Custom script: call RemoveLocation( udg_TempLoc2 )
      • Custom script: call DestroyGroup( udg_TempGroup )
      • Custom script: call RemoveLocation( udg_TempLoc )
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 1000.00
          • Unit - Remove Storm Crow Form from (Picked unit)
      • Unit - Unpause (Triggering unit)
      • Wait 2.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Kinesis ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 100.00
          • Unit - Remove Storm Crow Form from (Picked unit)
          • Unit - Unpause (Picked unit)


anyone see anything wrong with it? or know what i did wrong
 

Laiev

Hey Listen!!
Reaction score
188
Trigger:
  • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions
    • ~
    • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Kinesis ) Equal to True)) and do (Actions)
    • Loop - Actions
    • ~
    • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)
    • Loop - Actions


you leak this 3 groups...

also you instead of begin cast an ability, use start effect of

and sorry, i don't read all the trigger to check what is wrong, just those points of the trigger which call me :p
 

canons200

New Member
Reaction score
50
try to disable the storm crow part and run the game, check and see is there any different
 

GenDeath

New Member
Reaction score
6
Im a guessing here but in this line
Trigger:
  • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)

You are only passing one angle to the system thus casueing them to be moved in same direction.
 

All_Out_Mapp

Member
Reaction score
0
ok thanks GenDeath... that looks like it could be it
@ canons storm crow is necessary if i were to make the units lift in the air.
@ laiev that wasn't exactly what i was looking for, but thanks for pointing it out. I haven't had any problems from that aspect yet.
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
I think the problem is: the Knockback System use TempLoc variable, and you have used it to store caster's position through wait (3.00s) so, during this wait, the TempLoc can be used by the System and it gonna be removed and, somehow, the angle of the knockback got bugged.

the solution, I think, should be: use another variable to store caster's position OR re-set TempLoc after the wait:
Trigger:
  • Kenisis
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 1
    • Actions
      • Unit - Pause (Triggering unit)
      • Set TempUnit = (Triggering unit)
      • Set TempLoc = (Position of TempUnit)
      • Set TempGroup = (Units within 500.00 of TempLoc matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True)))
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to (Triggering unit)
            • Then - Actions
              • Unit - Pause (Picked unit)
              • Unit - Add Storm Crow Form to (Picked unit)
              • Animation - Change (Picked unit) flying height to (500.00 - (Distance between (Position of (Triggering unit)) and (Position of (Picked unit)))) at 500.00
            • Else - Actions
      • Wait 3.00 seconds
      • Set TempLoc = (Position of TempUnit)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 6
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (((Real((Level of Kinetic Barrier for (Triggering unit)))) x 50.00) - 100.00) damage of attack type Spells and damage type Normal
            • Else - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (25.00 + ((Real((Level of Kinetic Barrier for (Triggering unit)))) x 25.00)) damage of attack type Spells and damage type Normal
          • Set TempLoc2 = (Position of (Picked unit))
          • Set KnockbackCall_Unit = (Picked unit)
          • Set KnockbackCall_Dur = 2.00
          • Set KnockbackCall_Dist = (500.00 - (Distance between TempLoc and TempLoc2))
          • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
          • Set KnockbackCall_SFX = Abilities\Spells\Human\Flare\FlareTarget.mdl
          • Trigger - Run KnockbackCall <gen> (ignoring conditions)
          • Custom script: call RemoveLocation( udg_TempLoc2 )
      • Custom script: call DestroyGroup( udg_TempGroup )
      • Custom script: call RemoveLocation( udg_TempLoc )
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 1000.00
          • Unit - Remove Storm Crow Form from (Picked unit)
      • Unit - Unpause (Triggering unit)
      • Wait 2.00 seconds
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Kinesis ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit) flying height to 0.00 at 100.00
          • Unit - Remove Storm Crow Form from (Picked unit)
          • Unit - Unpause (Picked unit)


Code:
        Wait 3.00 seconds
        Set TempLoc = (Position of TempUnit)

this spell is similar to my sample spell: Force Push, but mine do not have wait :)
 

canons200

New Member
Reaction score
50
I think the problem is: the Knockback System use TempLoc variable, and you have used it to store caster's position through wait (3.00s) so, during this wait, the TempLoc can be used by the System and it gonna be removed and, somehow, the angle of the knockback got bugged.

the solution, I think, should be: use another variable to store caster's position OR re-set TempLoc after the wait:
oh ya, i think this should be the main reason your trigger doesn't work as your desired because the knock back system is also using the same variable as you use on your trigger.

it is better to use new variable for each trigger as i do, for each of my trigger, i use all different variable to "make" them not able to stack.
eg trigger 1, i use P_1(where it means point of triggering unit) for trigger 2, i use P_2(mean point of another triggering unit)
 

All_Out_Mapp

Member
Reaction score
0
Code:
Wait 3.00 seconds
Set TempLoc = (Position of TempUnit)

didn't work :\ . . . i think something must be wrong with the angles? it does every correctly other than the way it knocks them back.

(Could accidently setting KnockbackCall_Angle (and other angle variables) as integer instead of real, or as real instead of integer effect the correct execution of the ability?)
 

jig7c

Stop reading me...-statement
Reaction score
123
didn't work :\ . . . i think something must be wrong with the angles? it does every correctly other than the way it knocks them back.

(Could accidently setting KnockbackCall_Angle (and other angle variables) as integer instead of real, or as real instead of integer effect the correct execution of the ability?)

no, it has nothing to do with real/integer...

p.s. laiev, added to ur rep from other post that i owed u
 

All_Out_Mapp

Member
Reaction score
0
thought so... anything else?
also, ive tried the base funtion without all my waits and stuff, and it does the same thing of moving in one direction still
 

jig7c

Stop reading me...-statement
Reaction score
123
when you pick all the units in a group, you have to set different angles for each unit to fly off... in this piece of code...

Code:
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)
 Loop - Actions
           If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                 If - Conditions
                       (Picked unit) Not equal to (Triggering unit)
                 Then - Actions
                       Unit - Pause (Picked unit)
                       Unit - Add Storm Crow Form to (Picked unit)
                       Animation - Change (Picked unit) flying height to (500.00 - (Distance between (Position of (Triggering unit)) and (Position of (Picked unit)))) at 500.00
                 Else - Actions
 

All_Out_Mapp

Member
Reaction score
0
Trigger:
  • Unit Group - Pick every unit in TempGroup and do (Actions)
    • Loop - Actions
      • Unit - Unpause (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 6
        • Then - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (((Real((Level of Kinetic Barrier for (Triggering unit)))) x 50.00) - 100.00) damage of attack type Spells and damage type Normal
        • Else - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (25.00 + ((Real((Level of Kinetic Barrier for (Triggering unit)))) x 25.00)) damage of attack type Spells and damage type Normal
      • Set TempLoc2 = (Position of (Picked unit))
      • Set KnockbackCall_Unit = (Picked unit)
      • Set KnockbackCall_Dur = 2.00
      • Set KnockbackCall_Dist = (500.00 - (Distance between TempLoc and TempLoc2))
      • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
      • Set KnockbackCall_SFX = Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
      • Trigger - Run KnockbackCall <gen> (ignoring conditions)
      • Custom script: call RemoveLocation( udg_TempLoc2 )


that is what this should be doing... perhaps i need more of these then
Trigger:
  • Set TempLoc2 = (Position of (Picked unit))

with more tempLoc?

this is whats bugging me, it looks like if i want to do more than one angle im going to have to add a lot more to the code... but according to the "Force Push" i based this off of i shouldnt need to add more
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
This may help, i haven't read your entire trigger, but i have one based on war stomp:

Trigger:
  • DemonicStompEffect
    • Events
      • Unit - Demon Lord 0011 <gen> Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Demonic Stomp
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempLoc = (Position of (Casting unit))
      • Environment - Create a 1.00 second Normal ripple deformation at TempLoc with starting radius 300.00, ending radius 800.00, and depth 64.00, using 1.00 second ripples spaced 400.00 apart
      • Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempLoc2 = (Position of (Picked unit))
          • Set KnockbackCall_Unit = (Picked unit)
          • Set KnockbackCall_Dur = 0.40
          • Set KnockbackCall_Dist = (300.00 - (Distance between TempLoc and TempLoc2))
          • Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
          • Set KnockbackCall_SFX = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
          • Set KnockbackCall_DestroyTree = True
          • Trigger - Run Knocback Call <gen> (ignoring conditions)
          • Custom script: call RemoveLocation(udg_TempLoc2)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)


This pushes all the units towards their respective angles ^^
 

All_Out_Mapp

Member
Reaction score
0
well... hell, its the same thing as mine >.< ... minus the extra bits i added on here and there.

is your execution and call the same?
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Knockback call and knockback execute are unchanged from the default. I know it's crazy but try doing these things and see if it works:

Remove the waits and try it and Remove the Pausing and Unpausing and try it. Both are known to cause weird issues sometimes ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top