• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] IssuePointOrder in loop

Status
Not open for further replies.
Level 3
Joined
May 31, 2019
Messages
20
Here is my code:

function Trig_orderConditions takes nothing returns boolean
return ((GetSpellAbilityId() == 'A002'))
endfunction

function Trig_orderActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local unit t = CreateUnit(GetOwningPlayer(u), 'e000', x, y, 0)
local integer i = 1
local real x0
local real y0
call UnitApplyTimedLife(t, 'BHwe', 10)
call UnitAddAbility(t, 'A003')
call SetUnitAbilityLevel(t, 'A003', 1)
loop
exitwhen i > 36
set x0 = x + 100 * CosBJ(10.0 * I2R(i))
set y0 = y + 100 * SinBJ(10.0 * I2R(i))
call BJDebugMsg("x:" + R2S(x0) + ", y:" + R2S(y0))
call IssuePointOrder(t, "carrionswarm", x0, y0)
set i = i + 1
endloop
set u = null
set t = null
endfunction

//===========================================================================
function InitTrig_order takes nothing returns nothing
set gg_trg_order = CreateTrigger()
#ifdef DEBUG
call YDWESaveTriggerName(gg_trg_order, "order")
#endif
call TriggerRegisterAnyUnitEventBJ( gg_trg_order, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(gg_trg_order, Condition(function Trig_orderConditions))
call TriggerAddAction(gg_trg_order, function Trig_orderActions)
endfunction

What I expected to see is a circle but in game I only got one spelled to the right. I already change the Cool1 and Cost1 to 0.00.
 
I've already responded to this in The Lab. Please don't cross-post the same query. We're generally pretty quick.

The issue is that the spell isn't able to be cast by the same unit over and over in one instant.

You'll have to use a trick like add ability, cast spell, remove ability. You might also have to remove 'Amov' from the caster.
 
The issue is that the spell isn't able to be cast by the same unit over and over in one instant.

You'll have to use a trick like add ability, cast spell, remove ability. You might also have to remove 'Amov' from the caster..
You do not need such tricks, I made no changes to attached code.
 
Status
Not open for further replies.
Back
Top