- Joined
- May 22, 2007
- Messages
- 30
I need to make a bomb that explodes. I have the effects done, but I don't know how to make it hurt units!
Any suggestions for a JASS noob?
Here's my script, only with the effect
Any suggestions for a JASS noob?
Here's my script, only with the effect
JASS:
function Trig_Time_Bomb_3_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Bomb_3_Copy_Actions takes nothing returns nothing
local integer BombA1IntegerFor
local location BombPointA
local location BombPolarPointA
local location BombPolarPointA2
local effect BombPointAEffect
local effect BombPolarPointAEffect
local effect BombPolarPointA2Effect
local texttag three
local texttag two
local texttag one
set BombA1IntegerFor = GetRandomInt(1, 5)
set BombPointA = GetUnitLoc(GetTriggerUnit())
set BombPolarPointA = PolarProjectionBJ(BombPointA, 150.00, ( 60.00 * I2R(BombA1IntegerFor) ))
set BombPolarPointA = PolarProjectionBJ(BombPointA, 150.00, ( 60.00 * I2R(BombA1IntegerFor) ))
call TriggerSleepAction( 0.10 )
call CreateTextTagLocBJ( "TRIGSTR_068", BombPointA, 0, 10, 100, 100, 100, 0 )
set three =( GetLastCreatedTextTag() )
call TriggerSleepAction( 1.00 )
call DestroyTextTagBJ ( three)
call CreateTextTagLocBJ( "TRIGSTR_069", BombPointA, 0, 10, 100, 100, 100, 0 )
set two =( GetLastCreatedTextTag() )
call TriggerSleepAction( 1.00 )
call DestroyTextTagBJ( two)
call CreateTextTagLocBJ( "TRIGSTR_070", BombPointA, 0, 10, 100, 100, 100, 0 )
set one =( GetLastCreatedTextTag() )
call TriggerSleepAction( 1.00 )
call DestroyTextTagBJ( one)
call AddSpecialEffectLocBJ( BombPointA, "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set BombPointAEffect = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.10 )
call AddSpecialEffectLocBJ( BombPolarPointA, "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set BombPolarPointAEffect = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.10 )
call AddSpecialEffectLocBJ( BombPolarPointA2, "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
set BombPolarPointA2Effect = GetLastCreatedEffectBJ()
call UnitDamagePointLoc( GetTriggerUnit(), 1, 500, BombPointA, 1000.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE )
call TriggerSleepAction( 0.10 )
call RemoveLocation(BombPointA)
call RemoveLocation(BombPolarPointA)
call RemoveLocation(BombPolarPointA2)
call DestroyEffectBJ( BombPointAEffect )
call DestroyEffectBJ( BombPolarPointAEffect )
call DestroyEffectBJ( BombPolarPointA2Effect )
endfunction
constant function ExplosionSoundPath takes nothing returns string
return "Sound\\Buildings\\Death\\BuildingDeathLargeHuman.wav"
endfunction
//===========================================================================
function InitTrig_Time_Bomb_3_Copy takes nothing returns nothing
set gg_trg_Time_Bomb_3_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Bomb_3_Copy, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Time_Bomb_3_Copy, Condition( function Trig_Time_Bomb_3_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Time_Bomb_3_Copy, function Trig_Time_Bomb_3_Copy_Actions )
endfunction