- Joined
- Sep 29, 2006
- Messages
- 447
Ok so i dont really think that this is a problem with the JASS but you never know so.
basically the idea of the spell is, a unit launches a grenade at a target and it explodes dealing damage to everything in the area
everything is working except for the projectile art. what i did was have one dummy unit cast acid bomb in another (for the art) and then the dummy unit would cast thunderclap for teh damage, and a special effect is created. evrything except for teh acid bomb part works and i dont know why.
here's my trigger:
A00k is acid bomb dummy spell and A00L is the dummy thunderclap
as a side note:
there are two dummies being used h005 and h006. h006 is not invulnerabe and does not have locust, otherwise i wouldnt be able to cast acid bomb on it, so that is NOT the problem.
EDIT: the code tag messed up ill fix it hold on please
EDIT: okay all fixed, can anyone help?
basically the idea of the spell is, a unit launches a grenade at a target and it explodes dealing damage to everything in the area
everything is working except for the projectile art. what i did was have one dummy unit cast acid bomb in another (for the art) and then the dummy unit would cast thunderclap for teh damage, and a special effect is created. evrything except for teh acid bomb part works and i dont know why.
here's my trigger:
A00k is acid bomb dummy spell and A00L is the dummy thunderclap
Code:
function Trig_Grenade_Launch_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00J' ) ) then
return false
endif
return true
endfunction
function Trig_Grenade_Launch_Copy_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit TempUnit
local unit TempUnit2
local location TempPoint = GetUnitLoc(caster)
local location TempPoint2 = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 'h005', GetOwningPlayer(caster), TempPoint, bj_UNIT_FACING )
set TempUnit = GetLastCreatedUnit()
call UnitAddAbility( TempUnit, 'A00K' )
call UnitApplyTimedLife( TempUnit, 'BTLF', 6.00 )
call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(caster), TempPoint2, bj_UNIT_FACING )
set TempUnit2 = GetLastCreatedUnit()
call UnitAddAbility( TempUnit2, 'A00L' )
call SetUnitAbilityLevelSwapped( 'A00L', TempUnit2, GetUnitAbilityLevelSwapped('A00J', caster) )
call UnitApplyTimedLife( TempUnit2, 'BTLF', 6.00 ) call IssueTargetOrder( TempUnit, "acidbomb", TempUnit2 )
call TriggerSleepAction( ( DistanceBetweenPoints(TempPoint, TempPoint2) / 700.00 ) )
call IssueImmediateOrder( TempUnit2, "thunderclap" )
call AddSpecialEffectLoc( "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", TempPoint2 )
call DestroyEffect( GetLastCreatedEffectBJ() )
call RemoveLocation(TempPoint)
call RemoveLocation(TempPoint2)
set caster = null
set TempUnit = null
set TempUnit2 = null
endfunction
//===========================================================================
function InitTrig_Grenade_Launch_Copy takes nothing returns nothing
set gg_trg_Grenade_Launch_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Grenade_Launch_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Grenade_Launch_Copy, Condition( function Trig_Grenade_Launch_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Grenade_Launch_Copy, function Trig_Grenade_Launch_Copy_Actions )
endfunction
as a side note:
there are two dummies being used h005 and h006. h006 is not invulnerabe and does not have locust, otherwise i wouldnt be able to cast acid bomb on it, so that is NOT the problem.
EDIT: the code tag messed up ill fix it hold on please
EDIT: okay all fixed, can anyone help?