• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Spell] Detect Searing Arrows being cast.

Status
Not open for further replies.
Level 27
Joined
Nov 25, 2021
Messages
498
Basically, I'm trying to make an ability without DDS that when a Catapult unit attacks, it has a chance to shoot another projectile, by creating a dummy then order it to attack once. My genius idea is that, I add a Searing Arrows that is always on autocast to the Catapult, then use a trigger to detect it.

  • Events
    • Unit - A unit Is issued an order targeting an object
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Issued order) Equal to (Order(flamingarrows))
        • (Unit-type of (Ordered unit)) Equal to Catapult
        • (Random integer number between 1 and 10) Less than or equal to 3
      • Then - Actions
        • Set TempPoint = (Position of (Ordered unit))
        • Unit - Create 1 Catapult Dummy for (Owner of (Ordered unit)) at TempPoint facing Default building facing degrees
        • Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        • Unit - Order (Last created unit) to Attack Once (Target unit of issued order)
        • Custom script: call RemoveLocation (udg_TempPoint)
      • Else - Actions
However, it doesn't work after a lot of test runs so I need help fixing this, preferably without DDS.
 

Uncle

Warcraft Moderator
Level 72
Joined
Aug 10, 2018
Messages
7,754
Units don't issue an order when they attack unless you manually order it yourself. In this case you would literally have to press the Searing Arrows ability and then target a unit for the trigger to run. Unfortunately, there isn't a very good solution to this.

One idea that comes to mind is to use the Disease Cloud ability in order to detect when the attack lands, then you can create your Dummy in response.

So in response to this Event you would roll your dice and launch the second attack:
  • Events
    • Unit - A unit Spawns a summoned unit
 
Level 22
Joined
Dec 4, 2007
Messages
1,543
You know this can be abused right?
Just like Unit - is attacked.

Btw, @Uncle, i used Unit enters map area for that so far, since it doesn't seem like disease cloud is a summoned unit (at least i can't get it to work?!).
Are you sure that would work?
 
Level 24
Joined
Feb 27, 2019
Messages
806
I managed to make a semi working trigger but for some reason searing arrows cooldown does not occur when the demolisher uses stop, hold position or attacks standing still without being ordered a target or attack move. Sad.

Then theres the issue with attack ground that doesnt trigger searing arrows but can be fixed by changing artillery to missile splash at the loss of the attack ground button.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Demolisher
    • Actions
      • Custom script: local unit u = GetAttacker()
      • Wait 0.01 game-time seconds
      • Custom script: if ( BlzGetUnitAbilityCooldownRemaining(u, 'ACsa') > 0.00 ) then
      • Game - Display to (All players) the text: Detected
      • Custom script: else
      • Custom script: endif
      • Custom script: set u = null
I used polled wait because it was easier to make mui but a timer on 0.11 works fine too. I dont know why exactly 0.11 is the working value. If you disregard the error with the cooldown I am still not sure if the trigger can be abused or not. Maybe the polled wait is too inaccurate and the better option would be an exact timer, then still. Just sad.
 

Attachments

  • sad.w3m
    18.5 KB · Views: 12
Last edited:
Level 24
Joined
Feb 27, 2019
Messages
806
One idea that comes to mind is to use the Disease Cloud ability in order to detect when the attack lands, then you can create your Dummy in response.
The attack could be of type instant instead of artillery and a dummy projectile always spawn and if roll successful another projectile as well. That way both projectiles could fire at the same time. Theres just the issue of the attacked unit taking damage from the initial attack, fleeing and the attack ground would not be there.
 
Level 44
Joined
Feb 27, 2007
Messages
5,563
The only 'complete' solution I see is actually using a DDS:
  • Set the catapult's attack to instant like Rifleman and remove the projectile
  • Detect attack's damage with a DDS, store it, and calculate if this attack should be a double shot
  • Create & launch 1 or 2 missiles with the real model (write a script, use a physics system, or make dummy units cast Acid Bomb on each other)
  • When these missiles impact, deal the original damage you stored in step 2

  • You might need to know when attack ground was on/used or it might not work at all with instant ranged attacks.
 
Level 27
Joined
Nov 25, 2021
Messages
498
A quick update. So I was writing my post while being blitzed af, so I want to clarify what I was ACTUALLY trying to do: I want to make a Catapult that when it attacks, it has a chance to spawn an additional projectile (basically, double damage that looks cooler, without relying on Critical Strike, and can apply an ability that's based on Burning Oil).

So halfway through, I realize that the Catapult model's fault being its rock-flinging attack animation, which looks really awkward if a second projectile comes into play, and there's a slight but noticable delay when using Instant Attack + Dummy/DDS solution (I like DDS a lot, but I find myself being overreliant on it once I'm done importing it to a map, so I try to use it as little as possible). Basically, unless I switched the model altogether, the idea is visually doomed from the start (or maybe I just don't know how to use Animation Backswing Point, Animation Damage Point). And also, some solution requires sacrificing Attack Ground, which is not ideal.

So, I drop the double projectile thing altogether and opted for the Burning Oil part instead. By using Disease Cloud (Meat Wagon), I wrote this trigger.
  • Events
    • Unit - A unit enters (Playable map area)
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to Catapult Plague Ward
        • (Random integer number between 1 and 10) Less than or equal to 3
      • Then - Actions
        • Set TempPoint = (Position of (Triggering unit))
        • Unit - Order (Triggering unit) to Attack Ground TempPoint
        • Custom script: call RemoveLocation (udg_TempPoint)
      • Else - Actions
The dummy already has Burning Oil, and as far as I know, Attack Ground doesn't require vision. As for the double damage, I can configurate the dummy's attack stats so it mirrors the Catapult's. For my personal use, this trigger works pretty well, and quite copypastable to apply to other custom on-hit abilities as well.

While I only get about 70% of what I want, I still want to thank you guys for the learning experience. :thumbs_up:
 
Status
Not open for further replies.
Top