• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Warstomp Help

Status
Not open for further replies.
Level 9
Joined
Apr 20, 2008
Messages
125
Hey all. I've got an issue with my map: Warstomp's terrain deformation lags (as many people know). I've been trying to solve this - I already tried using a Neutral Hostile Warstomp and changing the deformation data fields to 0, but that doesn't seem to do anything.

Anyone have any suggestions? I'm open to triggering the whole spell, and it's pretty easy to just select every nearby unit and damage them. However, I don't know how to stun every unit in the radius, other than creating many dummy casters and having each one use a modified Stormbolt/Firebolt on each unit in range. I'd rather not resort to that.
 
Level 8
Joined
Feb 15, 2009
Messages
463
it is easy

just create a dummy(should be invisible) and a spell(stormbolt) with no manacost and cooldown u also need a global variable udg_TempGroup

no vJass version:

JASS:
function YourTrigger_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == <RAWCODE_OF_YOUR_ABILITY>
endfunction

function YourTrigger_Match takes nothing returns boolean
   return IsUnitEnemy(GetFilterUnit() , udg_TempUnit) and IsUnitType(GetFilterUnit() , UNIT_TYPE_MAGIC_IMMUNE) and IsUnitType(GetFilterUnit() , UNIT_TYPE_STRUCTURE) and GetWidgetLife(GetFilterUnit()) > 0.405
endfunction

function YourTrigger_Actions takes nothing returns nothing
    local unit u = GetSpellAbilityUnit()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local group g = CreateGroup()
    local boolexpr b = Condition(function Match)
    local unit d = CreateUnit(GetOwningPlayer(u) , <RAWCODE_OF_YOUR_DUMMY> , x ,y , 0.)
    local unit v
    
    call UnitAddAbility( d , <RAWCODE_OF_DUMMY_SPELL>)
    call SetUnitAbilityLevel( d , <RAWCODE_OF_DUMMY_SPELL> , GetUnitAbilityLevel( u ,<RAWCODE_OF_YOUR_ABILITY>))

    set udg_TempUnit = u
    call GroupEnumUnitsInRange(g , x, y , <RANGE_U_WANT> , b )

    loop
       set v = FirstOfGroup(g)
       exitwhen v == null
       call IssueTargetOrder( d , "stormbolt" , v)
       call GroupRemoveUnit( g , v)
    endloop

    call RemoveUnit(d)
    call DestroyGroup(g)
    call DestroyBoolExpr(b)
    set d = null
    set g = null
    set b = null
this should be it maybe rare Typos coz i did freehand here things in <> must be replaced by yourself
~Saia
 
Status
Not open for further replies.
Top