Eh, I'm trying to learn JASS, and I've converted an old GUI trigger that worked fine to JASS. I'm trying to change globals to locals etc. And I have trouble because I don't know what a Special Effect variable would be called. I've tryed
"local effect SE"
"local specialeffect SE"
and none of them works
Another problem is that I have now idea about what a BJ is... So if someone could explain that I would be happy.
It was a little part of Vexorian's JASS tutorial that tought me everything I know...
Here's the code:
"local effect SE"
"local specialeffect SE"
and none of them works
Another problem is that I have now idea about what a BJ is... So if someone could explain that I would be happy.
It was a little part of Vexorian's JASS tutorial that tought me everything I know...
Here's the code:
JASS:
function Trig_Mighty_Crush_JASS_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A003039; ) ) then
return false
endif
return true
endfunction
function Trig_Mighty_Crush_JASS_Func011A takes nothing returns nothing
local integer rngunits = ( 0 )
set rngunits = ( rngunits + 1)
endfunction
function Trig_Mighty_Crush_JASS_Func012A takes nothing returns nothing
call UnitDamageTargetBJ( udg_Caster, GetEnumUnit(), ( 100.00 * I2R(udg_LVL_MightyCrush) ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_LIGHTNING )
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Weapons\\Bolt\\BoltImpact.mdl" )
//Error here...
local effect SE = GetLastCreatedEffectBJ()
call PolledWait( 0.10 )
call DestroyEffectBJ( udg_SE )
endfunction
function Trig_Mighty_Crush_JASS_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
local unit caster = GetSpellAbilityUnit()
local location casterpoint = GetUnitLoc(caster)
local location targetpoint = GetUnitLoc(target)
local integer lvlmighty = GetUnitAbilityLevelSwapped(039;A003039;, caster)
call AddSpecialEffectLocBJ( targetpoint, "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
set udg_SE = GetLastCreatedEffectBJ()
call DestroyEffectBJ( udg_SE )
call SetUnitInvulnerable( caster, true )
call UnitDamageTargetBJ( caster, target, 75.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_LIGHTNING )
call ForGroupBJ( GetUnitsInRangeOfLocAll(212.00, targetpoint), function Trig_Mighty_Crush_JASS_Func011A )
call ForGroupBJ( GetUnitsInRangeOfLocAll(212.00, targetpoint), function Trig_Mighty_Crush_JASS_Func012A )
call SetUnitInvulnerable( caster, false )
//and error down here
call UnitDamageTargetBJ( caster, caster, ( 25.00 * I2R( rngunits ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function InitTrig_Mighty_Crush_JASS takes nothing returns nothing
set gg_trg_Mighty_Crush_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mighty_Crush_JASS, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mighty_Crush_JASS, Condition( function Trig_Mighty_Crush_JASS_Conditions ) )
call TriggerAddAction( gg_trg_Mighty_Crush_JASS, function Trig_Mighty_Crush_JASS_Actions )
endfunction