Leap spells :D!

n1mr0d

Member
Reaction score
1
Ok so , i was searching here on the site some spells , which are changing an unit's position and his height and weight over a time, or until it goes to the targeted point or unit. But i didn't find any. (maybe there were, and i missed). So i wanna make 1 spell , which will target a unit , and the targeted unit will be moved to the distance beetween target and triggering unit, (angle beetween target and triggering unit)x(-1) degrees. But i'm pretty confused, when i run the trigger with the event of every 0.03 seconds of the game-time, what should i do xD? i save the location of the targeted unit , and the 2nd location of targeted unit where he will go after .03 , but to change his height and weight :D ? some tips , and maybe some tutorials :D ?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you have to change it yourself with actions, but it cant be changed until crow form has been added
 

Iky

New Member
Reaction score
2
to change the fly height you just have to give and take off the crowform ability
add crow form to "unit"
remove crow form from "unit"

that's it XD
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
just add the AutoFly system from azlier, is in jass, but you don't have to do anything rather than a simple c/p.
then you can set their flyheight without adding removing crow form.
 

n1mr0d

Member
Reaction score
1
you have to change it yourself with actions, but it cant be changed until crow form has been added
yes but , how can i manage that the height/weight of the targeted unit to be 0 , after 10 seconds 100 and after 10 seconds again 0?
 

Iky

New Member
Reaction score
2
create a variable to take the currect flying height of unit, and every trigger run, you add a value to this variable and change the fly height to that variable

JASS:

set HeightVariable = HeightVariable + "the integer value of change"  
call SetUnitFlyHeight( "you unit", HeightVariable, 1600.00 ) // i  recomend this fly rate to change the fly height instantaly
 

n1mr0d

Member
Reaction score
1
create a variable to take the currect flying height of unit, and every trigger run, you add a value to this variable and change the fly height to that variable

JASS:

set HeightVariable = HeightVariable + "the integer value of change"  
call SetUnitFlyHeight( "you unit", HeightVariable, 1600.00 ) // i  recomend this fly rate to change the fly height instantaly

can you make it in gui ?
 

Iky

New Member
Reaction score
2
on init trigger
Code:
set HeightUnit = (Currect Flying height of UnitVariable)
in the knockback trigger (the trigger thats runs every 0.03 seconds)

Code:
set HeightUnit = HeightUnit + 10.00  //ex.
Animation - Change UnitVariable flying height to HeightUnit at 1600.00
 

n1mr0d

Member
Reaction score
1
on init trigger
Code:
set HeightUnit = (Currect Flying height of UnitVariable)
in the knockback trigger (the trigger thats runs every 0.03 seconds)

Code:
set HeightUnit = HeightUnit + 10.00  //ex.
Animation - Change UnitVariable flying height to HeightUnit at 1600.00

okay , and let's say , the trigger will run over 2 seconds, so the heightunit will be near 666.66 , and make his animation to that, but to change it back , to current flying height ?how ?(and it can be done in the same Loop trigger?)
 

Iky

New Member
Reaction score
2
good work at remember,

in a sample jump, you will cut the jump in two parts

---------------------|---------------------
in the knockback trigger, you will think how many will be the distance the unit will knock, just taking the time and the range per trigger you will have the value, and put this value in a variable in the init trigger

in the knock trigger, put 2 ifs, one inside the other:

Code:
if
C>CheckBoo equal true
A>if 
----C>(MaxHeightVariable/2) lass then or equal to HeightUnit 
----Then A>set Check = false
----Then A>set HeightUnit = HeightUnit - 10.00 //ex.
----Else A>set HeightUnit = HeightUnit + 10.00//ex.
Else A>set HeightUnit = HeightUnit - 10.00

set HeightUnit = HeightUnit + 10.00  //ex.
Animation - Change UnitVariable flying height to HeightUnit at 1600.00

i think is it
OBS: all code posted by me are non-mui
 

n1mr0d

Member
Reaction score
1
good work at remember,

in a sample jump, you will cut the jump in two parts

---------------------|---------------------
in the knockback trigger, you will think how many will be the distance the unit will knock, just taking the time and the range per trigger you will have the value, and put this value in a variable in the init trigger

in the knock trigger, put 2 ifs, one inside the other:

Code:
if
C>CheckBoo equal true
A>if 
----C>(MaxHeightVariable/2) lass then or equal to HeightUnit 
----Then A>set Check = false
----Then A>set HeightUnit = HeightUnit - 10.00 //ex.
----Else A>set HeightUnit = HeightUnit + 10.00//ex.
Else A>set HeightUnit = HeightUnit - 10.00

set HeightUnit = HeightUnit + 10.00  //ex.
Animation - Change UnitVariable flying height to HeightUnit at 1600.00

i think is it
OBS: all code posted by me are non-mui

i know it :p, so by A, C and CheckBoo what you mean ? and what result have MaxHeightVariable?
 

Iky

New Member
Reaction score
2
A = actions
C = conditions
CheckBoo is a boolean variable
sorry to write as that way, i think that way the better
 

Iky

New Member
Reaction score
2
this variable is to hold the max height fly, so, you choose what is the max height
i recomend 400
 

n1mr0d

Member
Reaction score
1
ok here is my trigger, and i think i miss understood you. just check it where it changes the units animation.
Trigger:
  • Magical Nest Effect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Magical_Nest_UnitGroup and do (Actions)
        • Loop - Actions
          • Set Magical_Nest_Unit = (Picked unit)
          • Unit - Turn collision for Magical_Nest_Unit Off
          • Set TempKey = (Key (Picked unit))
          • Set Magical_Nest_Special_Effect = (Load 1 of TempKey in Magical_Hashtable)
          • Set Magical_Nest_Range_Beetween = (Load 2 of TempKey from Magical_Hashtable)
          • Set Magical_Nest_Angle = (Load 3 of TempKey from Magical_Hashtable)
          • Set Magical_Nest_Lighting = (Load 4 of TempKey in Magical_Hashtable)
          • Set Magical_Nest_Speed = (Load 5 of TempKey from Magical_Hashtable)
          • Set Magical_Nest_Caster_Unit = (Load 6 of TempKey in Magical_Hashtable)
          • Set Magical_Nest_Caster_Point = (Position of Magical_Nest_Caster_Unit)
          • Set Magical_Nest_Level = (Load 7 of TempKey from Magical_Hashtable)
          • Set Magical_Nest_UnitHeight = (Load 8 of TempKey from Magical_Hashtable)
          • Set Magical_Nest_Boolean = (Load 9 of TempKey from Magical_Hashtable)
          • Set Magical_Nest_MaxHeight = (Load 10 of TempKey from Magical_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Magical_Nest_Range_Beetween Greater than 0.00
            • Then - Actions
              • Unit - Make Magical_Nest_Caster_Unit face Magical_Nest_Unit over 0.01 seconds
              • Set TempPoint1 = (Position of Magical_Nest_Unit)
              • Set TempPoint2 = (TempPoint1 offset by (Magical_Nest_Speed x 0.03) towards Magical_Nest_Angle degrees)
              • Lightning - Move Magical_Nest_Lighting to source Magical_Nest_Caster_Point and target TempPoint2
              • Unit - Move Magical_Nest_Unit instantly to TempPoint2
              • Hashtable - Save (Magical_Nest_Range_Beetween + (Magical_Nest_Speed x 0.03)) as 2 of TempKey in Magical_Hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Magical_Nest_Boolean Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Magical_Nest_MaxHeight / 2.00) Less than or equal to Magical_Nest_UnitHeight
                    • Then - Actions
                      • Set Magical_Nest_Boolean = False
                      • Set Magical_Nest_UnitHeight = (Magical_Nest_UnitHeight - 10.00)
                    • Else - Actions
                      • Set Magical_Nest_UnitHeight = (Magical_Nest_UnitHeight + 10.00)
                • Else - Actions
                  • Set Magical_Nest_UnitHeight = (Magical_Nest_UnitHeight - 10.00)
              • Animation - Change Magical_Nest_Unit flying height to Magical_Nest_UnitHeight at 1600.00
              • Hashtable - Save Magical_Nest_UnitHeight as 8 of TempKey in Magical_Hashtable
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
            • Else - Actions
              • Set TempPoint1 = (Position of Magical_Nest_Unit)
              • Special Effect - Destroy Magical_Nest_Special_Effect
              • Unit - Unpause Magical_Nest_Caster_Unit
              • Unit - Unpause Magical_Nest_Unit
              • Lightning - Destroy Magical_Nest_Lighting
              • Custom script: set bj_wantDestroyGroup = true
              • Destructible - Pick every destructible within 250.00 of TempPoint1 and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current life of (Picked destructible)) Greater than or equal to 0.00
                    • Then - Actions
                      • Unit - Order Harvest to Harvest (Picked destructible)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current order of Harvest) Equal to (Order(harvest))
                        • Then - Actions
                          • Destructible - Kill (Picked destructible)
                        • Else - Actions
                          • Unit - Order Harvest to Stop
                    • Else - Actions
              • Unit Group - Pick every unit in (Units within 250.00 of TempPoint1) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) belongs to an enemy of (Owner of Magical_Nest_Caster_Unit)) Equal to True
                      • ((Picked unit) is alive) Equal to True
                      • Magical_Nest_Unit Not equal to (Picked unit)
                    • Then - Actions
                      • Set TempPoint2 = (Position of (Picked unit))
                      • Unit - Create 1 Damage And Stun for (Owner of Magical_Nest_Caster_Unit) at TempPoint2 facing Default building facing degrees
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Unit - Set level of Magical Nest Stun for (Last created unit) to Magical_Nest_Level
                      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                      • Custom script: call RemoveLocation(udg_TempPoint2)
                    • Else - Actions
              • Special Effect - Create a special effect at TempPoint1 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Unit Group - Remove Magical_Nest_Unit from Magical_Nest_UnitGroup
              • Unit - Turn collision for Magical_Nest_Unit On
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_Magical_Nest_Caster_Point)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Magical_Nest_UnitGroup is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off Magical Nest Effect <gen>
                • Else - Actions
 
General chit-chat
Help Users

      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