• 🏆 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!

help with trigger

Status
Not open for further replies.
Level 4
Joined
Dec 4, 2014
Messages
97
that is how i try it
  • Itachi Attack
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Animation - Play Kabuto_Dummy_Itachi's spell throw animation
      • Unit - Create 1 Fire ball Dummy for (Owner of Kabuto_Caster) at ((Position of Kabuto_Dummy_Itachi) offset by 120.00 towards (Facing of Kabuto_Dummy_Itachi) degrees) facing (Facing of Kabuto_Dummy_Itachi) degrees
      • Set Fireball_Dummy = (Last created unit)
      • Set Fireball_Real = (Facing of Kabuto_Dummy_Itachi)
      • Set Fireball_Point = (Position of Fireball_Dummy)
      • Set Fireball_Point_2 = (Fireball_Point offset by 16.00 towards Fireball_Real degrees)
      • Set Fireball_Integer = (Fireball_Integer + 1.00)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Fireball_Integer Less than or equal to (<=) 70.00
          • Then - Actions
            • Unit - Move Fireball_Dummy instantly to Fireball_Point_2
          • Else - Actions
      • Trigger - Turn off (This trigger)
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
If you did just what LordDz wrote to the trigger you posted in post #3 and you did not do any other changes, then it won't do you any good.

First of all, you would create 33 fireball units per second (= one every 0.03) and move only the last one. Let me tell you right now - 33 units in one place is a lot of units. It will affect your game.

Second, in what you posted, you create 2 locations to move the missile - you save those locations into Fireball_Point and Fireball_Point2 respectively. Thing is, you don't destroy those locations after you're done with it, thus causing memory leak. You create 66 memory leaks per second which is a lot of leaks. You need to destroy those locations via custom script:
  • Custom script: call DestroyLocation(udg_NameOfVariable)
 
Status
Not open for further replies.
Top