Dryvnt
New Member
- Reaction score
- 10
i suck JASS but i want to make this Kamikazee trigger in JASS so it can get massed... it cant normal becuz im using unit variable and then as you know it will overwrite, but not with locals... but somehow it doesent work...
made trigger in GUI then copied and made to text... and changed name and "set *variable* = *value*" to "local unit *variablename*=*value*"
help = +rep
Edit : Thx for move. forgot about JASS help section
made trigger in GUI then copied and made to text... and changed name and "set *variable* = *value*" to "local unit *variablename*=*value*"
help = +rep
JASS:
function Trig_Kamikazee_JASS_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetAttacker()) == 039;h00H039; ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 039;h00G039; ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 039;h00C039; ) ) then
return true
endif
if ( ( GetUnitTypeId(GetAttacker()) == 039;h007039; ) ) then
return true
endif
return false
endfunction
function Trig_Kamikazee_JASS_Conditions takes nothing returns boolean
if ( not Trig_Kamikazee_JASS_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Kamikazee_JASS_Actions takes nothing returns nothing
call RemoveUnit( GetAttacker() )
call CreateNUnitsAtLoc( 1, 039;h008039;, GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttacker()), bj_UNIT_FACING )
local unit HangarUnit = GetLastCreatedUnit()
call CreateNUnitsAtLoc( 1, 039;h009039;, GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttacker()), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetUnitLoc(GetAttackedUnitBJ()) )
call SetUnitFlyHeightBJ( GetLastCreatedUnit(), 0.00, ( ( ( DistanceBetweenPoints(GetUnitLoc(GetAttackedUnitBJ()), GetUnitLoc(GetAttacker())) / GetUnitMoveSpeed(GetLastCreatedUnit()) ) / GetUnitFlyHeight(GetLastCreatedUnit()) ) + 0.00 ) )
call TriggerSleepAction( ( ( DistanceBetweenPoints(GetUnitLoc(GetAttackedUnitBJ()), GetUnitLoc(GetAttacker())) / GetUnitMoveSpeed(GetLastCreatedUnit()) ) + 0.00 ) )
call UnitDamageTargetBJ( GetLastCreatedUnit(), GetAttackedUnitBJ(), 60.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call ExplodeUnitBJ( GetLastCreatedUnit() )
call RemoveUnit( HangarUnit )
call CreateNUnitsAtLoc( 1, GetUnitTypeId(GetAttacker()), GetTriggerPlayer(), GetUnitLoc(GetAttacker()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Kamikazee_JASS takes nothing returns nothing
set gg_trg_Kamikazee_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kamikazee_JASS, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Kamikazee_JASS, Condition( function Trig_Kamikazee_JASS_Conditions ) )
call TriggerAddAction( gg_trg_Kamikazee_JASS, function Trig_Kamikazee_JASS_Actions )
endfunction
Edit : Thx for move. forgot about JASS help section