• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Anything wrong with here?

Status
Not open for further replies.
  • Nova 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Nova
    • Actions
      • Set Nova_Target = (Target unit of ability being cast)
      • Set Nova_Caster = (Triggering unit)
      • Set Nova_PointCaster = (Position of Nova_Caster)
      • Set Nova_PointTarget = (Position of Nova_Target)
      • Unit - Hide Nova_Caster
      • Unit - Create 1 Phoenix Dummy for (Owner of Nova_Caster) at Nova_PointCaster facing (Facing of Nova_Caster) degrees
      • Unit - Order (Last created unit) to Move To Nova_PointTarget
      • Unit Group - Add (Last created unit) to Nova_UG1
      • Hashtable - Save Handle OfNova_Caster as (Key caster) of (Key (Last created unit)) in Nova_Hash
      • Hashtable - Save Handle OfNova_Target as (Key target) of (Key (Last created unit)) in Nova_Hash
      • Custom script: call RemoveLocation(udg_Nova_PointTarget)
      • Custom script: call RemoveLocation(udg_Nova_PointCaster)
  • Nova 2
    • Events
      • Time - Every 0.07 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Nova_UG1 and do (Actions)
        • Loop - Actions
          • Set Nova_Caster = (Load (Key caster) of (Key (Picked unit)) in Nova_Hash)
          • Set Nova_Target = (Load (Key target) of (Key (Picked unit)) in Nova_Hash)
          • Set Nova_MissilePoint = (Position of (Picked unit))
          • Set Nova_PointTarget = (Position of Nova_Target)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Nova_MissilePoint and Nova_PointTarget) Less than or equal to 10.00
            • Then - Actions
              • Unit - Kill (Picked unit)
              • Special Effect - Create a special effect at Nova_PointTarget using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause Nova_Caster to damage Nova_Target, dealing 90.00 damage of attack type Spells and damage type Fire
              • Set Nova_UG2 = (Units within 450.00 of Nova_PointTarget matching (((Owner of (Matching unit)) is an enemy of (Owner of Nova_Caster)) Equal to True))
              • Unit Group - Pick every unit in Nova_UG2 and do (Actions)
                • Loop - Actions
                  • Unit - Cause Nova_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Fire
              • Unit - Move Nova_Caster instantly to Nova_PointTarget, facing Default building facing degrees
              • Unit - Unhide Nova_Caster
              • Unit - Remove (Picked unit) from the game
              • Custom script: call RemoveLocation(udg_Nova_PointTarget)
              • Custom script: call RemoveLocation(udg_Nova_MissilePoint)
              • Custom script: call DestroyGroup(udg_Nova_UG2)
            • Else - Actions
Anything wrong?
Is it MUI?
Does it leaks?
Would you tell me?

~supertoinkz
 
Level 9
Joined
Aug 21, 2008
Messages
533
SO this spell does:
caster casts nova,
caster dissappers
after some time he appears at the target and the spell actulally is casted

the only prob i found is , that you forget to clean up the hashtable.

and maybe you want to use a custom movement instead of the standart one. I have no idea what would happens if you cast this spell at an unreachable point =/
 
The second trigger could be done like this:
  • Nova 2
  • Events
    • Time - Every 0.07 seconds of game time
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Nova_UG1 is empty) Equal o False
      • Then - Actions
        • Unit Group - Pick every unit in Nova_UG1 and do (Actions)
          • Loop - Actions
            • Set Nova_Caster = (Load (Key caster) of (Key (Picked unit)) in Nova_Hash)
            • Set Nova_Target = (Load (Key target) of (Key (Picked unit)) in Nova_Hash)
            • Set Nova_MissilePoint = (Position of (Picked unit))
            • Set Nova_PointTarget = (Position of Nova_Target)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Distance between Nova_MissilePoint and Nova_PointTarget) Less than or equal to 10.00
              • Then - Actions
                • Special Effect - Create a special effect at Nova_PointTarget using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
                • Special Effect - Destroy (Last created special effect)
                • Unit - Cause Nova_Caster to damage Nova_Target, dealing 90.00 damage of attack type Spells and damage type Fire
                • Set Nova_UG2 = (Units within 450.00 of Nova_PointTarget matching ((Matching unit) belongs to an enemy of (Owner of (Picked unit)) Equal to True)
                • Unit Group - Pick every unit in Nova_UG2 and do (Actions)
                  • Loop - Actions
                    • Unit - Cause Nova_Caster to damage (Picked unit), dealing 40.00 damage of attack type Spells and damage type Fire
                    • Unit - Move Nova_Caster instantly to Nova_PointTarget, facing Default building facing degrees
                    • Unit - Unhide Nova_Caster
                    • Hashtable - Clear all child hashtables of (Key(Picked unit)) from Hashtable
                    • Unit - Kill (Picked unit)
                    • Unit - Remove (Picked unit) from the game
            • Custom script: call RemoveLocation(udg_Nova_PointTarget)
            • Custom script: call RemoveLocation(udg_Nova_MissilePoint)
            • Custom script: call DestroyGroup(udg_Nova_UG2)
      • Else - Actions
        • Trigger - Turn off (This trigger)
And yes, the trigger is fine, seems MUI. You could use a knockback-style movement (Unit - Move unit) for the Phoenix, instead of issuing it to move to point. ;)
 
Status
Not open for further replies.
Top