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

Frost Arrows with Frost Nova

Status
Not open for further replies.
Level 2
Joined
Aug 29, 2015
Messages
7
I have been working on a spell based on Frost Arrows. I want to make the caster use Frost Nova whenever it casts Frost Arrow.
I tried this:

upload_2018-7-28_18-52-19.png


But the unit instantly casts Frost Nova, instead of landing a hit on the target before casting the skill.
I tried using the (A unit finishes casting an ability), but it the FN did not cast.
I also tried delaying the casting of FN to 0.5, but the game crashed.

Can somebody help me? :(
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
Target unit of ability being cast doesn't work after a wait but you can save it in a local variable. Make a new unit variable and then shadow that with 1 custom script line so it behaves like a local variable instead of global.
  • Actions
    • Custom script: local unit udg_YOUR_UNIT
    • -------- The line above this MUST be the first in the trigger --------
    • Set YOUR_UNIT = (Target unit of ability being cast)
    • Wait 0.00 game time seconds //basically waits the minimum duration, which is much greater than 0.
    • Unit - Add Acid Shot Slow to (triggering Unit)
    • Unit - Order (Triggering Unit) to Undead Lich - Frost Nova (YOUR_UNIT)
    • Wait 0.30 game time seconds //needs to be longer probably
    • Unit - Remove Acid Shot Slow from (triggering Unit)
That's a pretty sloppy trigger actually and a better implemenation would just be to make some invisible dummy units (don't show on minimap, invulnerable, have Locust or Ghost (visible) but no model. Create one, give it frost nova, order it to use it, and set the unit to expire.
  • Set TempPoint = Position of (target unit of ability being cast)
  • Unit - Create one DummyCaster for (owner of triggering unit) at TempPoint facing default buidling facing degrees
  • Unit - Add Acid Shot Slow to (last created unit)
  • Unit - Order (last created unit) to Undead Lich - Frost Nova (Target unit of ability being cast)
  • Unit - Apply 1.00 second timed life to (last created unit)
 
Level 5
Joined
Jul 27, 2017
Messages
73
Concerning the Frost-Nova everything has been written by Pyrogasm but there might be another problem since Frozen Arrows is an auto-cast skill.
I already encountered a problem with those skills that they do not trigger the a Start-effect-of-ability-event.
If you order a unit to use this skill by pressing it's button or the hotkey then the event fires but not if the unit uses the Skill as an autocast. So maybe you should test if you ability is concerned of this problem aswell.

Please correct me if i am wrong.
 
Level 2
Joined
Aug 29, 2015
Messages
7
I managed to do it this way:
upload_2018-7-28_23-18-14.png

upload_2018-7-28_23-18-43.png


The above triggers are to identify whether the autocast is on or off
and if the autocast is on then the unit with the ability is included in UnitGroup_AcidShot_Casters
and if one of the units in that Unit Group attacks they will cast Acid Shot Slow

upload_2018-7-28_23-19-12.png


I tried using a dummy:
upload_2018-7-28_23-22-5.png


but the dummy is not being created
can somebody tell me what the problem is?

edit:
Target unit of ability being cast doesn't work after a wait but you can save it in a local variable. Make a new unit variable and then shadow that with 1 custom script line so it behaves like a local variable instead of global.
  • Actions
    • Custom script: local unit udg_YOUR_UNIT
    • -------- The line above this MUST be the first in the trigger --------
    • Set YOUR_UNIT = (Target unit of ability being cast)
    • Wait 0.00 game time seconds //basically waits the minimum duration, which is much greater than 0.
    • Unit - Add Acid Shot Slow to (triggering Unit)
    • Unit - Order (Triggering Unit) to Undead Lich - Frost Nova (YOUR_UNIT)
    • Wait 0.30 game time seconds //needs to be longer probably
    • Unit - Remove Acid Shot Slow from (triggering Unit)
That's a pretty sloppy trigger actually and a better implemenation would just be to make some invisible dummy units (don't show on minimap, invulnerable, have Locust or Ghost (visible) but no model. Create one, give it frost nova, order it to use it, and set the unit to expire.
  • Set TempPoint = Position of (target unit of ability being cast)
  • Unit - Create one DummyCaster for (owner of triggering unit) at TempPoint facing default buidling facing degrees
  • Unit - Add Acid Shot Slow to (last created unit)
  • Unit - Order (last created unit) to Undead Lich - Frost Nova (Target unit of ability being cast)
  • Unit - Apply 1.00 second timed life to (last created unit)

Thank you Pyrogasm +rep and to all of you
 

Attachments

  • upload_2018-7-28_23-19-12.png
    upload_2018-7-28_23-19-12.png
    29.9 KB · Views: 73
Level 39
Joined
Feb 27, 2007
Messages
5,011
1. Attacking Unit and Attacked Unit will not work after a wait.

2.The trigger you wrote is also not MUI (if two units attack immediately after each other with the secoks happening before the first's wait 0.5 finishes, the second attack witll overwrite all your variables (like Unit_AcidShot_Target). This will cause the frost first's frost nova to fail to cast on the proper target.

3. A Unit is Attacked is a really awful event that doesn't fire when you think it should. It happens when the attack starts (is ordered by a player) so it can be abused by spamming right click + S to trigger the event without actually attacking. I would really recommend against using it at all costs and would instead suggested you get a DDS and trigger the frost nova to run off that.

4. Instead of "create units facing point" and use the same point for creation and facing you can just use "create unit ... facing Default Building Facing degrees.

5. You leak Point_AcidShot_TargetPoint. Clean it up at the end with Custom Script: call RemoveLocation(udg_Point_AcidShot_TargetPoint)

6. Now that you fixed the autocast thing by making the group, your trigger no longer does the frost nova on units manually targeted by the spell.
 
Last edited:
Level 11
Joined
May 16, 2016
Messages
730
But the unit instantly casts Frost Nova, instead of landing a hit on the target before casting the skill.
I tried using the (A unit finishes casting an ability), but it the FN did not cast.
I also tried delaying the casting of FN to 0.5, but the game crashed.

Can somebody help me? :(
I tried using a dummy:
Then somebody uses the "Unit is Attacked" my heart is getting hurt.
Leave the team UNITISATTACKED and join the DamageDetection club like a real dude.
The system is MUI and uses GUI Friendly Damage Detection
 

Attachments

  • SUPER FROST ARROW.w3x
    27.1 KB · Views: 44
Status
Not open for further replies.
Top