• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Beam Ability not looking right

Status
Not open for further replies.
Level 4
Joined
Aug 16, 2013
Messages
75
No idea what I am doing wrong here. I have a beam ability which just loops through creating dummy unit light balls to make it look like it is a beam. The problem is that sometimes the dummy unit light balls look as if they are falling down when they are created. I tried multiple methods such as adjusting spawn distance and changing the facing angle and so on but I can't seem to get it to just stay in one location when it is created rather than the balls of light having some sort of falling animation.


  • Kamehameha Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kamehameha
    • Actions
      • Floating Text - Create floating text that reads Ka..me..ha..me.. at (Position of Saiyan Defender of Earth 0000 <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Set Goku_Position = 0.00
      • Set Goku_Kamehameha_Distance = 0
      • Set Goku_Casting_Unit = (Target unit of ability being cast)
      • Trigger - Turn on Kamehameha Fire <gen>
      • Trigger - Turn off (This trigger)
  • Kamehameha Fire
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Goku_Kamehameha_Distance = (Goku_Kamehameha_Distance + 1)
      • Set Goku_Position = (Goku_Position + 25.00)
      • Unit - Create 1 KH_Trail for Player 1 (Red) at ((Position of Saiyan Defender of Earth 0000 <gen>) offset by Goku_Position towards (Facing of Saiyan Defender of Earth 0000 <gen>) degrees) facing Default building facing degrees
      • Unit Group - Pick every unit in (Units within 100.00 of (Position of (Last created unit)) matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause Saiyan Defender of Earth 0000 <gen> to damage (Picked unit), dealing ((Real((Intelligence of Saiyan Defender of Earth 0000 <gen> (Include bonuses)))) x 2.00) damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Goku_Kamehameha_Distance Equal to 30
        • Then - Actions
          • Unit - Create 1 KH_Explosion for Player 1 (Red) at ((Position of Saiyan Defender of Earth 0000 <gen>) offset by Goku_Position towards (Facing of Saiyan Defender of Earth 0000 <gen>) degrees) facing Default building facing degrees
          • Unit Group - Pick every unit in (Units within 100.00 of (Position of (Last created unit)) matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit - Cause Saiyan Defender of Earth 0000 <gen> to damage (Picked unit), dealing ((Real((Intelligence of Saiyan Defender of Earth 0000 <gen> (Include bonuses)))) x 2.00) damage of attack type Spells and damage type Normal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Goku_Kamehameha_Distance Greater than or equal to 31
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type KH_Trail) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
          • Unit - Unpause Goku_Casting_Unit
          • Trigger - Turn on Kamehameha Remove Explosion <gen>
          • Trigger - Turn on Kamehameha Test <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
  • Kamehamaha Remove Explosion
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type KH_Explosion) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Trigger - Turn off (This trigger)


If anyone knows what is causing this, please tell me.
 

Attachments

  • Beam Wave screenshot.png
    Beam Wave screenshot.png
    1.4 MB · Views: 76
Last edited:
Level 4
Joined
Aug 16, 2013
Messages
75
The collision for the dummy unit is set to 0.

When you create the unit, use the SetUnitX and SetUnitY natives on their creation spots to make sure they are moved where they should be without having to check for collision.

I am increasing the distance by +25 with the Goku_Position variable for each dummy unit created. Do I need to increase +25 to a higher number or?
 
Level 4
Joined
Aug 16, 2013
Messages
75
The dummy units are flying movement types. Unless you meant that the hero has to be a flying movement type.

Also, I don't know where or how to use SetUnit. I am guessing that is from jass?
 
Level 4
Joined
Aug 16, 2013
Messages
75
Yes.

KH_Leading is for the new trigger solution I was working on but achieved the same problem with the falling animation. KH_Leading isn't part of the trigger posted on my first post just so you are clear.

This is my new current trigger I am working on:

  • Kamehameha Test 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kamehameha
    • Actions
      • Unit - Create 1 KH_Leading for Player 1 (Red) at ((Position of Saiyan Defender of Earth 0000 <gen>) offset by 150.00 towards (Facing of Saiyan Defender of Earth 0000 <gen>) degrees) facing Default building facing degrees
      • Set Goku_KH_Leading_Unit = (Last created unit)
      • Set Goku_Kamehameha_Distance = 0
      • Trigger - Turn on Kamehameha Move <gen>
      • Trigger - Turn off (This trigger)
  • Kamehameha Move
    • Events
      • Time - Every 0.15 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Goku_KH_Leading_Unit to Move To ((Position of Saiyan Defender of Earth 0000 <gen>) offset by 700.00 towards (Facing of Saiyan Defender of Earth 0000 <gen>) degrees)
      • Unit - Create 1 KH_Trail for Player 1 (Red) at ((Position of Goku_KH_Leading_Unit) offset by 50.00 towards (Facing of Saiyan Defender of Earth 0000 <gen>) degrees) facing Default building facing degrees
      • Set Goku_Kamehameha_Distance = (Goku_Kamehameha_Distance + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Goku_Kamehameha_Distance Equal to 31
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type KH_Trail) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
          • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type KH_Leading) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
          • Trigger - Turn on Kamehameha Test 2 <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
picture3.png is the result I am looking for but sometimes when using the ability the dummy unit will do the falling animation.
 

Attachments

  • picture1.png
    picture1.png
    253.1 KB · Views: 55
  • picture2.png
    picture2.png
    263.8 KB · Views: 84
  • picture3.png
    picture3.png
    1.3 MB · Views: 45
Last edited:
Level 4
Joined
Aug 16, 2013
Messages
75
Here is a test map. Just make sure you stand still while casting. I will fix everything else, just want to fix this falling down animation first.
 

Attachments

  • Beam Test Map.w3x
    18.9 KB · Views: 56
Level 4
Joined
Aug 16, 2013
Messages
75
Jeez, that was stressful. I didn't think it was an actual animation for the model. Knowing that, it was really easy to fix it so it doesn't do the birth animation. The picture below is what I did to fix it.

Thanks so much for helping me. I would have never knew about what was causing this problem.
 

Attachments

  • picture4.png
    picture4.png
    113.7 KB · Views: 96
Status
Not open for further replies.
Top