[JASS] Fixing this trigger

Level 2
Joined
May 20, 2007
Messages
6
I've been working on making an omnislash for hours now... i've been taking my time trying to understand the natives and what not and not just simply copy-paste... now i'm really upset because it's not working! I have an idea of what it is, it might be because i got the spell id, but i do not know how much to put in, because the first thing it says is 'A000' however after that there's a string like it comes out to be "A000:AEim" now which is the spell id. my code is shown below...

JASS:
function Slash_Condition takes nothing returns boolean
    return GetSpellAbilityId() == 'A000' //Compares the ability id of the ability being cast to the ability id of our Slash spell.
endfunction   

function slash_actions takes nothing returns nothing
local unit caster= GetSpellAbilityUnit()
local location temp_loc
local unit temp
local location casterlocation= GetUnitLoc(caster)
local group enemies=CreateGroup()
local integer count=5
call  GroupEnumUnitsInRangeOfLoc(enemies, casterlocation, 500.00, null)
loop
set temp= FirstOfGroup(enemies)
if IsUnitEnemy(temp, GetOwningPlayer(caster)) then
exitwhen count==0
set temp_loc= GetUnitLoc(temp)
//call AddSpecialEffectLoc(Abilities\Spells\NightElf\Blink\BlinkCaster.mdl, casterlocation)
call SetUnitPositionLoc(caster, temp_loc)
//call AddSpecialEffectLoc(Abilities\Spells\NightElf\Blink\BlinkCaster.mdl, temp_loc)
call UnitDamageTarget(caster, temp, 50.00, true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_METAL_HEAVY_SLICE) 
set count= count - 1
endif
endloop
set caster=null
set temp_loc=null
set temp=null
set casterlocation=null
set enemies=null
endfunction


function InitTrig_settingupslash takes nothing returns nothing
local trigger gg_trg_slash= CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_slash, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_slash, Condition(function Slash_Condition))
call TriggerAddAction(gg_trg_slash, function slash_actions)
endfunction

thanks. (i'm really flustered/annoyed :slp:)
 
Level 2
Joined
May 20, 2007
Messages
6
thign is thought i haven't even been able to start the trigger, like my guy doesn't even go in to attack, or anything, another thing is, at what pace does the trigger occur? how fast?
 
Level 2
Joined
May 20, 2007
Messages
6
this trigger doesn't even start, i'm dreadfully annoyed right now, i cast a spell, its idd is "A000" and it doesnt' start! Do i add the rest of it? it's seperated by a semicolon so i'm not sure.
 
Top