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

Using firebolt on my own units and trigger ability

Level 3
Joined
Nov 23, 2023
Messages
14
I want to make my warlocks' firebolt only can be shot to grunts. When the grunt is shot he instantly dies and all friendly units around him gots the Inner Fire effect for a short time. How can I do that.
I am new and use 1.29.2 version.
 
Level 39
Joined
Feb 27, 2007
Messages
5,016
You can repurpose one of the mostly-unused unit classifications (like ancient, suicidal, undead, etc.), give that classification to Grunts in the Object Editor, and then put that classification into the Firebolt's Targets Allowed field... but most of those have side-effects on enemy AI when given to units. The easiest solution would be simply to tell the unit to stop if given the order to use Firebolt on a non-grunt.

For the Inner Fire effect, you will need to create a dummy inner fire skill and a dummy unit to cast it. A single dummy unit can cast instantly on every target if the dummy is properly configured. In addition to giving it the Locust ability, no model, no shadow, and maximum mana, as I recall it needs to have:
  • Cast point: 0.00
  • Cast backswing: 0.00
  • Movement type: NONE
There is some nuance to the size of the area when picking units to cast inner fire on, so you can either add <half of the largest collision size in your map> to the search radius, add 32 to the search radius as a middle-ground, or don't add anything at all. Edge cases may be different depending on what you choose. Don't forget to clean up the point and unit group leaks you create along the way.

  • Events
    • Unit - A unit is issued an order targeting a unit
  • Conditions
    • (Issued order) equal to WhateverTheNameOfTheFireboltOrderIsIDon'tRemember
    • (Unit-type of (Triggering Unit)) equal to Warlock
    • (Unit-type of (Target unit of issued order)) not equal to Grunt
  • Actions
    • Unit - Order (Triggering Unit) to Stop
  • Events
    • Unit - A unit starts the effect of an ability //this one only fires once it's successfully cast
  • Conditions
    • (Ability being cast) equal to YOUR_WARLOCK_FIREBOLT_ABILITY
  • Actions
    • Set TempPoint = (Position of (Target unit of ability being cast))
    • Unit - Kill (Target unit of ability being cast)
    • Unit - Create one DUMMY_UNIT_TYPE for (Owner of (Triggering Unit)) at TempPoint facing Default building facing degrees
    • Unit - Add INNER_FIRE_DUMMY_ABILITY to (Last created unit)
    • Unit - Add a 2.00 second generic expiration timer to (Last created unit)
    • Custom script: set bj_wantDestroyGroup = true //a trick to remove the unit group leak in the next line
    • Unit Group - Pick every unit in (Units within (SEARCH RADIUS + 32.00) of TempPoint) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Then actions) else do (Else actions)
          • If - Conditions
            • ((Picked unit) is Alive) equal to True
            • ((Picked unit) belongs to an Ally of (Triggering Player)) equal to True
            • ((Picked unit) is a Structure) equal to False
          • Then - Actions
            • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
          • Else - Actions
    • Custom script: call RemoveLocation(udg_TempPoint) //cleaning the point leak, read about it in the thread I linked if you don't understand
 
Last edited:
Top