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

Not following attack order

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
Uhm, im trying to make a floating helion at the position of a unit and one at the position of a unit with polar offset 2.0 by the facing of the unit, but the unit doesnt attack, it just sits there (as evaluated when used "wait") Any flaws in my trigger? the ATF variable is for something else, minerals are ammo and vespene is max ammo

  • Atk
    • Events
      • UI - Player Any Player clicks Left mouse button Down.
    • Local Variables
      • tempPlayer = 0 <Integer>
      • tempPlayerGroup = (Empty player group) <Player Group>
    • Conditions
    • Actions
      • Variable - Set tempPlayer = (Triggering player)
      • Player Group - Add player tempPlayer to tempPlayerGroup
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Player tempPlayer Minerals) == 0
        • Then
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • Ron[tempPlayer] == false
              • (Player 1 Vespene) >= 1
            • Then
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • (Player 1 Vespene) >= 8
                • Then
                  • Variable - Set Ron[tempPlayer] = true
                  • UI - Display "Reloading..." for tempPlayerGroup to Error area
                  • General - Wait 3.0 Real Time seconds
                  • UI - Display "Reloaded" for tempPlayerGroup to Error area
                  • Player - Modify player tempPlayer Minerals: Set To 8
                  • Variable - Set Ron[tempPlayer] = false
                • Else
                  • Player - Modify player tempPlayer Minerals: Set To (Player 1 Vespene)
            • Else
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • Ron[tempPlayer] == false
                • Then
                  • UI - Display "Error : No Ammo Remaining " for tempPlayerGroup to Error area
                • Else
        • Else
          • Point - Move GlobalPoint To (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world)))
          • Unit - Make RedHero face GlobalPoint over 0.0 seconds
          • Animation - Play Attack Default animation for (Actor for RedHero) as Default, using Play Forever options and Default Time blend time
          • Variable - Set Atf[1][1] = false
          • Variable - Set Atf[2][1] = false
          • Variable - Set Atf[4][1] = false
          • Variable - Set Atf[3][1] = false
          • Point - Move GlobalPoint To (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world)))
          • Point - Move GlobalPoint To (Position of RedHero)
          • Unit - Create 1 Hellion for player 1 at GlobalPoint facing (Facing of RedHero) degrees (Ignore Placement)
          • Variable - Set Bes[1] = (Last created unit)
          • Point - Move GlobalPoint2 To ((Position of RedHero) offset by 2.0 towards (Facing of RedHero) degrees)
          • Unit - Create 1 Hellion for player 1 at GlobalPoint2 facing (Facing of RedHero) degrees (Ignore Placement)
          • Unit - Order Bes[1] to ( Attack targeting (Last created unit)) (Replace Existing Orders)
          • Unit - Remove Bes[1] from the game
          • Unit - Remove (Last created unit) from the game
          • Player - Modify player 1 Minerals: Subtract 1
          • Player - Modify player 1 Vespene: Subtract 1
 
Level 11
Joined
Aug 1, 2009
Messages
963
The Hellion probably takes a split second to attack, so because you remove it instantly it doesn't have enough time. I would recommend using the Create Effect at Target function instead, and creating the hellions attack effect on the target point or whatever you want it to shoot.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
(as evaluated when used "wait")

waiting 3 seconds after the atk command is ordered just proves that they sit there and do jack

and i dont want it to shoot a target, i want it to shoot a line, thats why i provided the second,

Edit : got it to work ^^

Edit : now it just spits out some random number between 10 and 200

33kssnq.jpg


  • Atk
    • Events
      • UI - Player Any Player clicks Left mouse button Down.
    • Local Variables
      • tempPlayer = 0 <Integer>
      • tempPlayerGroup = (Empty player group) <Player Group>
    • Conditions
    • Actions
      • Variable - Set tempPlayer = (Triggering player)
      • Player Group - Add player tempPlayer to tempPlayerGroup
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Player tempPlayer Minerals) == 0
        • Then
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • Ron[tempPlayer] == false
              • (Player 1 Vespene) >= 1
            • Then
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • (Player 1 Vespene) >= 8
                • Then
                  • Variable - Set Ron[tempPlayer] = true
                  • UI - Display "Reloading..." for tempPlayerGroup to Error area
                  • General - Wait 3.0 Real Time seconds
                  • UI - Display "Reloaded" for tempPlayerGroup to Error area
                  • Player - Modify player tempPlayer Minerals: Set To 8
                  • Variable - Set Ron[tempPlayer] = false
                • Else
                  • Player - Modify player tempPlayer Minerals: Set To (Player 1 Vespene)
            • Else
              • General - If (Conditions) then do (Actions) else do (Actions)
                • If
                  • Ron[tempPlayer] == false
                • Then
                  • UI - Display "Error : No Ammo Remaining " for tempPlayerGroup to Error area
                • Else
        • Else
          • Point - Move GlobalPoint To (Point((Mouse X position clicked in the world), (Mouse Y position clicked in the world)))
          • Unit - Make RedHero face GlobalPoint over 0.0 seconds
          • Animation - Play Attack Default animation for (Actor for RedHero) as Default, using Play Forever options and Default Time blend time
          • Variable - Set Atf[1][1] = false
          • Variable - Set Atf[2][1] = false
          • Variable - Set Atf[4][1] = false
          • Variable - Set Atf[3][1] = false
          • Point - Move GlobalPoint2 To ((Position of RedHero) offset by 2.0 towards (Facing of RedHero) degrees)
          • Unit - Create 1 Hellion for player 1 at GlobalPoint2 facing (Facing of RedHero) degrees (Ignore Placement)
          • Environment - Execute Hellion - Infernal Flame Thrower (Create Persistent) on (Last created unit) from RedHero
          • Unit - Remove (Last created unit) from the game
          • Player - Modify player 1 Minerals: Subtract 1
          • Player - Modify player 1 Vespene: Subtract 1
          • UI - Display ("Abberation Health : " + (Text((Aberration [110.29, 171.94] Life (Current))) with Any Precision decimal places)) for tempPlayerGroup to Error area
 

Attachments

  • abbh.jpg
    abbh.jpg
    7.3 KB · Views: 74
Last edited:
Status
Not open for further replies.
Top