• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How to set unit pitch angle via trigger?

Status
Not open for further replies.
Level 7
Joined
Jan 3, 2014
Messages
59
I got problem on my spell (Kamehameha). I'm trying to use only 1 dummy with dummy.mdx as the model and i'm using
  • Custom script: call SetUnitAnimationByIndex(unit, animIndex)
(animIndex is the pitch angle). But what happen when using it, the dummy fly height in OE is 0 but in game, the dummy fly height starts from nearly 200 and decreasing to the desired height (100 that i set via trigger with rate 0).

Can anyone help me with this?
Here's the trigger:
  • Kamehameha Loop
    • Events
    • Conditions
    • Actions
      • For each (Integer Kh_index) from 1 to Kh_maxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kh_stageID[Kh_index] Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current order of Kh_caster[Kh_index]) Equal to Kh_orderID
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Kh_reachedDistance[Kh_index] Less than Kh_distance[Kh_index]
                    • Then - Actions
                      • Set Kh_realTimer[Kh_index] = (Kh_realTimer[Kh_index] - Kh_timerSpeed)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Kh_realTimer[Kh_index] Less than or equal to 0.00
                        • Then - Actions
                          • Set Kh_realTimer[Kh_index] = Kh_loopingEffectInterval
                          • Set Kh_tempLoc = (Kh_startPoint[Kh_index] offset by Kh_loopingEffectOffset towards Kh_angle[Kh_index] degrees)
                          • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing Kh_angle[Kh_index] degrees
                          • Set Kh_dummyCount = (Kh_dummyCount + 1)
                          • Set Kh_dummy = (Last created unit)
                          • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_loopingEffectModel
                          • Set Kh_dummyModel[(Custom value of Kh_dummy)] = (Last created special effect)
                          • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_loopingEffectScale[udg_Kh_level[udg_Kh_index]], 0, 0)
                          • Custom script: if UnitAddAbility(udg_Kh_dummy,'Amrf') and UnitRemoveAbility(udg_Kh_dummy,'Amrf') then
                          • Custom script: endif
                          • Custom script: call SetUnitFlyHeight(udg_Kh_dummy, udg_Kh_loopingEffectHeight[udg_Kh_level[udg_Kh_index]],0)
                          • Custom script: call SetUnitAnimationByIndex(udg_Kh_dummy,R2I(udg_Kh_loopingEffectPitchAngle))
                          • Unit - Add a Kh_loopingEffectTime second Generic expiration timer to Kh_dummy
                          • Custom script: call RemoveLocation(udg_Kh_tempLoc)
                        • Else - Actions
                      • Set Kh_tempLoc = (Kh_startPoint[Kh_index] offset by Kh_reachedDistance[Kh_index] towards Kh_angle[Kh_index] degrees)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Terrain pathing at Kh_tempLoc of type Kh_missilePathType is off) Equal to False
                        • Then - Actions
                          • Custom script: call SetUnitX(udg_Kh_missileHead[udg_Kh_index], GetLocationX(udg_Kh_tempLoc))
                          • Custom script: call SetUnitY(udg_Kh_missileHead[udg_Kh_index], GetLocationY(udg_Kh_tempLoc))
                          • Set Kh_realTimer2[Kh_index] = (Kh_realTimer2[Kh_index] - Kh_timerSpeed)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Kh_realTimer2[Kh_index] Less than or equal to 0.00
                            • Then - Actions
                              • Set Kh_realTimer2[Kh_index] = Kh_missileEffectInterval
                              • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing Kh_angle[Kh_index] degrees
                              • Set Kh_dummyCount = (Kh_dummyCount + 1)
                              • Set Kh_dummy = (Last created unit)
                              • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_missileEffectModel
                              • Set Kh_dummyModel[(Custom value of Kh_dummy)] = (Last created special effect)
                              • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_missileEffectScale[udg_Kh_level[udg_Kh_index]], 0, 0)
                              • Custom script: if UnitAddAbility(udg_Kh_dummy,'Amrf') and UnitRemoveAbility(udg_Kh_dummy,'Amrf') then
                              • Custom script: endif
                              • Custom script: call SetUnitFlyHeight(udg_Kh_dummy, udg_Kh_missileEffectHeight[udg_Kh_level[udg_Kh_index]],0)
                              • Custom script: call SetUnitAnimationByIndex(udg_Kh_dummy,R2I(udg_Kh_missileEffectPitchAngle))
                              • Unit - Add a Kh_missileEffectTime second Generic expiration timer to Kh_dummy
                            • Else - Actions
                          • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing Kh_angle[Kh_index] degrees
                          • Set Kh_dummyCount = (Kh_dummyCount + 1)
                          • Set Kh_dummy = (Last created unit)
                          • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_missileModel
                          • Set Kh_dummyModel[(Custom value of Kh_dummy)] = (Last created special effect)
                          • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_missileScale[udg_Kh_level[udg_Kh_index]], 0, 0)
                          • Custom script: if UnitAddAbility(udg_Kh_dummy,'Amrf') and UnitRemoveAbility(udg_Kh_dummy,'Amrf') then
                          • Custom script: endif
                          • Custom script: call SetUnitFlyHeight(udg_Kh_dummy, udg_Kh_missileHeight[udg_Kh_level[udg_Kh_index]],0)
                          • Custom script: call SetUnitAnimationByIndex(udg_Kh_dummy,R2I(udg_Kh_missilePitchAngle))
                          • Unit Group - Add Kh_dummy to Kh_missileGroup[Kh_index]
                          • Set Kh_tempGroup = (Units within Kh_damageMissileRadius[Kh_level[Kh_index]] of Kh_tempLoc)
                          • Unit Group - Pick every unit in Kh_tempGroup and do (Actions)
                            • Loop - Actions
                              • Set Kh_pickedUnit = (Picked unit)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Kh_pickedUnit is dead) Equal to False
                                  • (Kh_pickedUnit is A flying unit) Equal to False
                                  • (Kh_pickedUnit is Magic Immune) Equal to False
                                  • (Kh_pickedUnit is in Kh_damagedGroup[Kh_index]) Equal to False
                                  • (Kh_pickedUnit belongs to an ally of Kh_owner[Kh_index]) Equal to False
                                • Then - Actions
                                  • Special Effect - Create a special effect attached to the Kh_damageMEffectAttachment of Kh_pickedUnit using Kh_damageMissileEffect
                                  • Special Effect - Destroy (Last created special effect)
                                  • Unit - Cause Kh_caster[Kh_index] to damage Kh_pickedUnit, dealing Kh_damageMissile[Kh_level[Kh_index]] damage of attack type Kh_attackType and damage type Kh_damageType
                                  • Unit Group - Add Kh_pickedUnit to Kh_damagedGroup[Kh_index]
                                • Else - Actions
                          • Custom script: call DestroyGroup(udg_Kh_tempGroup)
                          • Destructible - Pick every destructible within Kh_damageMissileRadius[Kh_level[Kh_index]] of Kh_tempLoc and do (Actions)
                            • Loop - Actions
                              • Set Kh_tempDest = (Picked destructible)
                              • Custom script: if IssueTargetOrderById(udg_Kh_harvester, 852018, udg_Kh_tempDest) then
                              • Destructible - Kill Kh_tempDest
                              • Custom script: endif
                          • Custom script: call IssueImmediateOrderById(udg_Kh_harvester,udg_Kh_stopOrder)
                          • Set Kh_reachedDistance[Kh_index] = (Kh_reachedDistance[Kh_index] + Kh_missileSpeed[Kh_level[Kh_index]])
                        • Else - Actions
                          • Set Kh_reachedDistance[Kh_index] = Kh_distance[Kh_index]
                          • Set Kh_tempLoc2 = (Kh_startPoint[Kh_index] offset by Kh_distance[Kh_index] towards Kh_angle[Kh_index] degrees)
                          • Custom script: call SetUnitX(udg_Kh_missileHead[udg_Kh_index], GetLocationX(udg_Kh_tempLoc2))
                          • Custom script: call SetUnitY(udg_Kh_missileHead[udg_Kh_index], GetLocationY(udg_Kh_tempLoc2))
                          • Custom script: call RemoveLocation(udg_Kh_tempLoc2)
                      • Custom script: call RemoveLocation(udg_Kh_tempLoc)
                    • Else - Actions
                      • Set Kh_tempLoc = (Position of Kh_missileHead[Kh_index])
                      • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing 0.00 degrees
                      • Set Kh_dummyCount = (Kh_dummyCount + 1)
                      • Set Kh_dummy = (Last created unit)
                      • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_explosionEffectModel[1]
                      • Set Kh_dummyModel[(Custom value of Kh_dummy)] = (Last created special effect)
                      • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_explosionEffect1Scale[udg_Kh_level[udg_Kh_index]], 0, 0)
                      • Unit - Add a Kh_explosionEffectTime[1] second Generic expiration timer to Kh_dummy
                      • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing 0.00 degrees
                      • Set Kh_dummyCount = (Kh_dummyCount + 1)
                      • Set Kh_dummy = (Last created unit)
                      • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_explosionEffectModel[2]
                      • Set Kh_dummyModel[(Custom value of Kh_dummy)] = (Last created special effect)
                      • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_explosionEffect2Scale[udg_Kh_level[udg_Kh_index]], 0, 0)
                      • Unit - Add a Kh_explosionEffectTime[2] second Generic expiration timer to Kh_dummy
                      • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing 0.00 degrees
                      • Set Kh_dummy = (Last created unit)
                      • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_dustEffectModel
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_dustEffectScale[udg_Kh_level[udg_Kh_index]], 0, 0)
                      • Custom script: if UnitAddAbility(udg_Kh_dummy,'Amrf') and UnitRemoveAbility(udg_Kh_dummy,'Amrf') then
                      • Custom script: endif
                      • Custom script: call SetUnitFlyHeight(udg_Kh_dummy, udg_Kh_dustEffectHeight[udg_Kh_level[udg_Kh_index]],0)
                      • Unit - Add a Kh_dustEffectTime second Generic expiration timer to Kh_dummy
                      • Animation - Change Kh_dummy's animation speed to Kh_dustEffectAnimSpeed% of its original speed
                      • Set Kh_tempGroup = (Units within Kh_damageExplosionRadius[Kh_level[Kh_index]] of Kh_tempLoc)
                      • Unit Group - Pick every unit in Kh_tempGroup and do (Actions)
                        • Loop - Actions
                          • Set Kh_pickedUnit = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Kh_pickedUnit is dead) Equal to False
                              • (Kh_pickedUnit is Magic Immune) Equal to False
                              • (Kh_pickedUnit belongs to an ally of Kh_owner[Kh_index]) Equal to False
                            • Then - Actions
                              • Unit - Cause Kh_caster[Kh_index] to damage Kh_pickedUnit, dealing Kh_damageExplosion[Kh_level[Kh_index]] damage of attack type Kh_attackType and damage type Kh_damageType
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_Kh_tempGroup)
                      • Destructible - Pick every destructible within Kh_damageExplosionRadius[Kh_level[Kh_index]] of Kh_tempLoc and do (Actions)
                        • Loop - Actions
                          • Set Kh_tempDest = (Picked destructible)
                          • Custom script: if IssueTargetOrderById(udg_Kh_harvester, udg_Kh_harvestOrder, udg_Kh_tempDest) then
                          • Destructible - Kill Kh_tempDest
                          • Custom script: endif
                      • Custom script: call IssueImmediateOrderById(udg_Kh_harvester,udg_Kh_stopOrder)
                      • Custom script: call RemoveLocation(udg_Kh_tempLoc)
                      • Custom script: call RemoveLocation(udg_Kh_startPoint[udg_Kh_index])
                      • Custom script: call DestroyGroup(udg_Kh_damagedGroup[udg_Kh_index])
                      • Custom script: call IssueImmediateOrderById(udg_Kh_caster[udg_Kh_index],udg_Kh_stopOrder)
                      • Set Kh_curTransparency[Kh_index] = 0.00
                      • Set Kh_stageID[Kh_index] = 2
                • Else - Actions
                  • Custom script: call RemoveLocation(udg_Kh_startPoint[udg_Kh_index])
                  • Custom script: call DestroyGroup(udg_Kh_damagedGroup[udg_Kh_index])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Kh_missileGroup[Kh_index] is empty) Equal to True
                    • Then - Actions
                      • Set Kh_curTransparency[Kh_index] = 100.00
                    • Else - Actions
                      • Set Kh_curTransparency[Kh_index] = 0.00
                  • Set Kh_stageID[Kh_index] = 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Kh_stageID[Kh_index] Equal to 2
                • Then - Actions
                  • Set Kh_curTransparency[Kh_index] = (Kh_curTransparency[Kh_index] + Kh_missileFadeSpeed[Kh_level[Kh_index]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Kh_curTransparency[Kh_index] Less than 100.00
                    • Then - Actions
                      • Unit Group - Pick every unit in Kh_missileGroup[Kh_index] and do (Actions)
                        • Loop - Actions
                          • Set Kh_dummy = (Picked unit)
                          • Animation - Change Kh_dummy's vertex coloring to (100.00%, 100.00%, 100.00%) with Kh_curTransparency[Kh_index]% transparency
                    • Else - Actions
                      • Unit Group - Pick every unit in Kh_missileGroup[Kh_index] and do (Actions)
                        • Loop - Actions
                          • Unit - Kill (Picked unit)
                      • Custom script: call DestroyGroup(udg_Kh_missileGroup[udg_Kh_index])
                      • Set Kh_stageID[Kh_index] = 5
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Kh_stageID[Kh_index] Equal to 3
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current order of Kh_caster[Kh_index]) Equal to Kh_orderID
                        • Then - Actions
                          • Set Kh_realTimer[Kh_index] = (Kh_realTimer[Kh_index] - Kh_timerSpeed)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Kh_realTimer[Kh_index] Less than or equal to 0.00
                            • Then - Actions
                              • Animation - Change Kh_caster[Kh_index]'s animation speed to Kh_throwAnimationSpeed[Kh_level[Kh_index]]% of its original speed
                              • Animation - Play Kh_caster[Kh_index]'s Kh_throwAnimation animation
                              • Set Kh_realTimer[Kh_index] = Kh_throwDelay[Kh_level[Kh_index]]
                              • Set Kh_stageID[Kh_index] = 4
                            • Else - Actions
                        • Else - Actions
                          • Special Effect - Destroy Kh_attachedEffect[Kh_index]
                          • Sound - Stop Kh_lastSound[Kh_index] Immediately
                          • Set Kh_stageID[Kh_index] = 5
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Kh_stageID[Kh_index] Equal to 4
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current order of Kh_caster[Kh_index]) Equal to Kh_orderID
                            • Then - Actions
                              • Set Kh_realTimer[Kh_index] = (Kh_realTimer[Kh_index] - Kh_timerSpeed)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Kh_realTimer[Kh_index] Less than or equal to 0.00
                                • Then - Actions
                                  • Animation - Change Kh_caster[Kh_index]'s animation speed to 100.00% of its original speed
                                  • Special Effect - Destroy Kh_attachedEffect[Kh_index]
                                  • Set Kh_tempLoc = (Position of Kh_caster[Kh_index])
                                  • Set Kh_startPoint[Kh_index] = (Kh_tempLoc offset by Kh_releaseEffectOffset towards Kh_angle[Kh_index] degrees)
                                  • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc facing Kh_angle[Kh_index] degrees
                                  • Set Kh_dummyCount = (Kh_dummyCount + 1)
                                  • Set Kh_dummy = (Last created unit)
                                  • Special Effect - Create a special effect attached to the origin of Kh_dummy using Kh_releaseEffectModel
                                  • Set Kh_dummyModel[(Custom value of Kh_dummy)] = (Last created special effect)
                                  • Custom script: call SetUnitScale(udg_Kh_dummy, udg_Kh_releaseEffectScale[udg_Kh_level[udg_Kh_index]], 0, 0)
                                  • Custom script: if UnitAddAbility(udg_Kh_dummy,'Amrf') and UnitRemoveAbility(udg_Kh_dummy,'Amrf') then
                                  • Custom script: endif
                                  • Custom script: call SetUnitFlyHeight(udg_Kh_dummy, udg_Kh_releaseEffectHeight[udg_Kh_level[udg_Kh_index]],0)
                                  • Custom script: call SetUnitAnimationByIndex(udg_Kh_dummy,R2I(udg_Kh_releaseEffectPitchAngle))
                                  • Unit - Add a Kh_releaseEffectTime second Generic expiration timer to Kh_dummy
                                  • Custom script: set udg_Kh_missileGroup[udg_Kh_index] = CreateGroup()
                                  • Custom script: set udg_Kh_damagedGroup[udg_Kh_index] = CreateGroup()
                                  • Set Kh_tempLoc2 = (Kh_tempLoc offset by Kh_missileStartOffset towards Kh_angle[Kh_index] degrees)
                                  • Custom script: call RemoveLocation(udg_Kh_tempLoc)
                                  • Unit - Create 1 Kh_dummyType for Kh_owner[Kh_index] at Kh_tempLoc2 facing Kh_angle[Kh_index] degrees
                                  • Set Kh_dummyCount = (Kh_dummyCount + 1)
                                  • Set Kh_missileHead[Kh_index] = (Last created unit)
                                  • Special Effect - Create a special effect attached to the origin of Kh_missileHead[Kh_index] using Kh_missileHeadModel
                                  • Set Kh_dummyModel[(Custom value of Kh_missileHead[Kh_index])] = (Last created special effect)
                                  • Custom script: call SetUnitScale(udg_Kh_missileHead[udg_Kh_index], udg_Kh_missileHeadScale[udg_Kh_level[udg_Kh_index]], 0, 0)
                                  • Custom script: if UnitAddAbility(udg_Kh_missileHead[udg_Kh_index],'Amrf') and UnitRemoveAbility(udg_Kh_missileHead[udg_Kh_index],'Amrf') then
                                  • Custom script: endif
                                  • Custom script: call SetUnitFlyHeight(udg_Kh_missileHead[udg_Kh_index], udg_Kh_missileHeadHeight[udg_Kh_level[udg_Kh_index]],0)
                                  • Custom script: call SetUnitAnimationByIndex(udg_Kh_missileHead[udg_Kh_index],R2I(udg_Kh_missileHeadPitchAngle))
                                  • Unit Group - Add Kh_missileHead[Kh_index] to Kh_missileGroup[Kh_index]
                                  • Custom script: call RemoveLocation(udg_Kh_tempLoc2)
                                  • Sound - Stop Kh_lastSound[Kh_index] Immediately
                                  • Sound - Play Kh_releaseSound at 100.00% volume, attached to Kh_caster[Kh_index]
                                  • Set Kh_reachedDistance[Kh_index] = Kh_missileStartOffset
                                  • Set Kh_realTimer[Kh_index] = 0.00
                                  • Set Kh_realTimer2[Kh_index] = Kh_missileEffectInterval
                                  • Set Kh_stageID[Kh_index] = 1
                                • Else - Actions
                            • Else - Actions
                              • Special Effect - Destroy Kh_attachedEffect[Kh_index]
                              • Sound - Stop Kh_lastSound[Kh_index] Immediately
                              • Set Kh_stageID[Kh_index] = 5
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Kh_stageID[Kh_index] Equal to 5
                            • Then - Actions
                              • Set Kh_angle[Kh_index] = Kh_angle[Kh_maxIndex]
                              • Set Kh_attachedEffect[Kh_index] = Kh_attachedEffect[Kh_maxIndex]
                              • Set Kh_caster[Kh_index] = Kh_caster[Kh_maxIndex]
                              • Set Kh_damagedGroup[Kh_index] = Kh_damagedGroup[Kh_maxIndex]
                              • Set Kh_lastSound[Kh_index] = Kh_lastSound[Kh_maxIndex]
                              • Set Kh_level[Kh_index] = Kh_level[Kh_maxIndex]
                              • Set Kh_missileGroup[Kh_index] = Kh_missileGroup[Kh_maxIndex]
                              • Set Kh_missileHead[Kh_index] = Kh_missileHead[Kh_maxIndex]
                              • Set Kh_owner[Kh_index] = Kh_owner[Kh_maxIndex]
                              • Set Kh_reachedDistance[Kh_index] = Kh_reachedDistance[Kh_maxIndex]
                              • Set Kh_realTimer[Kh_index] = Kh_realTimer[Kh_maxIndex]
                              • Set Kh_realTimer2[Kh_index] = Kh_realTimer2[Kh_maxIndex]
                              • Set Kh_stageID[Kh_index] = Kh_stageID[Kh_maxIndex]
                              • Set Kh_startPoint[Kh_index] = Kh_startPoint[Kh_maxIndex]
                              • Set Kh_maxIndex = (Kh_maxIndex - 1)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Kh_maxIndex Equal to 0
                                • Then - Actions
                                  • Trigger - Turn off Kamehameha Dummy <gen>
                                  • Trigger - Turn off (This trigger)
                                • Else - Actions
                                  • Set Kh_index = (Kh_index - 1)
                            • Else - Actions
When i disable setting the dummy animation by index, it goes normal but i really need this one.
And one more, the dummy that fly from about 200 is only the main missiles

If you need more info, just say...


 
Last edited:
Level 28
Joined
Sep 26, 2009
Messages
2,520
JASS:
SetUnitAnimationByIndex
has nothing to do with pitch angle.

Each animated model has set of animations - e.g. the "Footman" model has "stand - 1", "stand - 2", "walk", etc. animations.

Each animation has its own index number, starting with 0.
The command "SetUnitAnimationByIndex" actually forces the model to play animation under index you put inside the command.

  • Custom script: call SetUnitAnimationByIndex(which_unit, animation's_index_number)
This action has nothing to do with pitch angle, unless the model itself has animations set up in such a way that it would pitch a bit to sides.

I would say that the animation you use is an animation where the model "descends" down from sky.
 
Level 7
Joined
Jan 3, 2014
Messages
59
@Dalvengyr
It works just fine! thanks! (+rep)
I add every pitch variables with 90 in the init trigger.

@Nichilus & Xonok
thanks for the reply...


But i got another problem guys, the missile head looks not moving to the right place. When the spell casted, the missile head looks spawn and start from behind of the caster and when the main missiles are moving to the target, the missile head looks moving a bit faster than the other missiles (leaving them behind with about 100 distance). I've already checked the triggers few times, but i can't find what's wrong...
 

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
But i got another problem guys, the missile head looks not moving to the right place. When the spell casted, the missile head looks spawn and start from behind of the caster and when the main missiles are moving to the target, the missile head looks moving a bit faster than the other missiles (leaving them behind with about 100 distance). I've already checked the triggers few times, but i can't find what's wrong...
then it's a problem with missile model, to fix it, you need to edit the model using model editor (I think it's problem with model's node/pivot point or something, I don't know)

EDIT:
try to ask about this at modeling section.
 
Status
Not open for further replies.
Top