- Joined
- May 1, 2008
- Messages
- 655
OK i have been trying to make this spell work.The special effects and everything works but the whole problem is that when i used it just randomly teleports me to the middle of map and then my hero gets kills for some reason which it shuoldnt do and also it doesnt do any dmg here's the code in JASS
ill +rep whoever can help me please
found help
JASS:
function Trig_Omnislash_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Omnislash_Copy_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Teleport_Counter )
set udg_caster = GetSpellAbilityUnit()
set udg_target = GetSpellTargetUnit()
call PauseUnitBJ( true, GetEventTargetUnit() )
call PauseUnitBJ( true, GetTriggerUnit() )
call SetUnitPathing( GetTriggerUnit(), false )
call SetUnitAnimation( GetTriggerUnit(), "slam" )
call TriggerSleepAction( 0.05 )
call SetUnitTimeScalePercent( GetTriggerUnit(), 0.00 )
call AddSpecialEffectTargetUnitBJ( "weapon", GetTriggerUnit(), "Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl" )
call TriggerSleepAction( 2 )
call SetUnitTimeScalePercent( GetTriggerUnit(), 100.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectTargetUnitBJ( "weapon", GetTriggerUnit(), "Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl" )
set udg_bladetrail = GetLastCreatedEffectBJ()
call SetUnitTimeScalePercent( GetTriggerUnit(), 200.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_point = OffsetLocation(GetUnitLoc(GetEventTargetUnit()), 150.00, ( 1 + 1 ))
set udg_point = GetUnitLoc(GetEventTargetUnit())
call SetUnitAnimationWithRarity( GetTriggerUnit(), "attack", RARITY_RARE )
call TriggerSleepAction( 0.15 )
call SetUnitPositionLocFacingLocBJ( GetTriggerUnit(), GetUnitLoc(GetEventTargetUnit()), GetUnitLoc(GetEventTargetUnit()) )
call TriggerSleepAction( 0.25 )
call SetUnitFacingToFaceUnitTimed( GetTriggerUnit(), GetEventTargetUnit(), 0 )
call SetUnitAnimationWithRarity( GetTriggerUnit(), "attack", RARITY_RARE )
call TriggerSleepAction( 0.25 )
call SetUnitFacingToFaceUnitTimed( GetTriggerUnit(), GetEventTargetUnit(), 0 )
call SetUnitAnimationWithRarity( GetTriggerUnit(), "attack", RARITY_RARE )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call SetUnitTimeScalePercent( GetTriggerUnit(), 100.00 )
call TriggerSleepAction( 0.25 )
call SetUnitPositionLoc( GetTriggerUnit(), PolarProjectionBJ(GetUnitLoc(GetEventTargetUnit()), 100.00, ( GetUnitFacing(GetTriggerUnit()) + 180.00 )) )
call SetUnitAnimation( GetTriggerUnit(), "slam" )
call TriggerSleepAction( 0.30 )
call SetUnitTimeScalePercent( GetTriggerUnit(), 0.00 )
call TriggerSleepAction( 0.25 )
call DestroyEffectBJ( udg_bladetrail )
call AddSpecialEffectTargetUnitBJ( "weapon", GetTriggerUnit(), "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl" )
call TriggerSleepAction( 1.00 )
call AddSpecialEffectLocBJ( GetUnitLoc(GetEventTargetUnit()), "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" )
call AddSpecialEffectLocBJ( GetUnitLoc(GetEventTargetUnit()), "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" )
call AddSpecialEffectLocBJ( GetUnitLoc(GetEventTargetUnit()), "Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl" )
call UnitDamageTargetBJ( GetTriggerUnit(), GetEventTargetUnit(), 8000.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_ENHANCED )
call SetUnitTimeScalePercent( GetTriggerUnit(), 50.00 )
call TriggerSleepAction( 1.00 )
call SetUnitTimeScalePercent( GetTriggerUnit(), 100.00 )
call ResetUnitAnimation( GetTriggerUnit() )
call PauseUnitBJ( false, GetTriggerUnit() )
call PauseUnitBJ( false, GetTriggerUnit() )
call SetUnitPathing( GetTriggerUnit(), true )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Omnislash_Copy takes nothing returns nothing
set gg_trg_Omnislash_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Omnislash_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Omnislash_Copy, Condition( function Trig_Omnislash_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Omnislash_Copy, function Trig_Omnislash_Copy_Actions )
endfunction
ill +rep whoever can help me please
found help
Last edited: