• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Animation appears too fast

Status
Not open for further replies.
Level 8
Joined
Sep 24, 2007
Messages
300
I am using trigger to animate the explosions of the attacks, for few different types of unit.
  • Animations
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacking unit)) Equal to Flame Thrower
        • Then - Actions
          • Set ShootingLoc[1] = (Position of (Attacked unit))
          • Special Effect - Create a special effect at ShootingLoc[1] using Environment\LargeBuildingFire\LargeBuildingFire1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_ShootingLoc[1])
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Attacking unit)) Equal to Elite Machinegunner
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Attacked unit)) Equal to Marine
                  • (Unit-type of (Attacked unit)) Equal to Worker
                  • (Unit-type of (Attacked unit)) Equal to Sniper
                  • (Unit-type of (Attacked unit)) Equal to Elite Machinegunner
                  • (Unit-type of (Attacked unit)) Equal to Flame Thrower
                  • (Unit-type of (Attacked unit)) Equal to Mortar
            • Then - Actions
              • Set ShootingLoc[3] = (Position of (Attacked unit))
              • Special Effect - Create a special effect at ShootingLoc[3] using Objects\Spawnmodels\Human\HumanBlood\HumanBloodSorceress.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_ShootingLoc[3])
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Attacking unit)) Equal to T-34
                      • (Unit-type of (Attacking unit)) Equal to Sherman
                • Then - Actions
                  • Set ShootingLoc[4] = (Position of (Attacked unit))
                  • Special Effect - Create a special effect at ShootingLoc[4] using war3mapImported\ShrapnelShards.mdx
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_ShootingLoc[4])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Attacking unit)) Equal to Mammoth Tank
                    • Then - Actions
                      • Set ShootingLoc[5] = (Position of (Attacked unit))
                      • Wait 0.50 seconds
                      • Special Effect - Create a special effect at ShootingLoc[5] using war3mapImported\NewMassiveEX.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_ShootingLoc[5])
                    • Else - Actions

Now, the problem is in event. "Unit is attacked" Is triggered when the attacking unit comes in acquisition range and orders the attack.

Now the problem: If you move (or stop the attack in some other way) the attacking unit after it orders the attack, the animation is shown but the enemy unit does not receive damage. The event doesn't really detect that unit was attacked, but only the order of the attacker. Result: Explosion animation without damage.

How to solve this? Any better event? Could wait actions solve this?

PS: I can't use cutsom attack model and just set it to instant, because I am using imported sounds along with original attack models, so I am forced to use existing attack models (ex: archer's arrow).
 
Status
Not open for further replies.
Top