- Joined
- Mar 5, 2008
- Messages
- 3,887
Here is my first Jass (its converted GUI, i just played with it a bit(removed some BJ and set some locals))
Syntax gives me 8 errors (special effect is not array (or something like that))
How do i make a local special effect array?
Is it possible to move "UNIT_STATE_LIFE" in a loop?(thats how was in GUI) locals? are they right?
There is no timers.
Could someone correct the code?
Any good tips are welcome.
I fail totally D:
-BZR-
Syntax gives me 8 errors (special effect is not array (or something like that))
How do i make a local special effect array?
Is it possible to move "UNIT_STATE_LIFE" in a loop?(thats how was in GUI) locals? are they right?
There is no timers.
Could someone correct the code?
Any good tips are welcome.
I fail totally D:
JASS:
function Trig_Shdow_Fury_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Shdow_Fury_Func011Func012C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, target) < 60.00 ) ) then
return false
endif
return true
endfunction
function Trig_Shdow_Fury_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local effect eff
local effect eff2
local integer i = 0
local integer iloop = 20
local location TargetLoc1
local location TargetLoc2
local real r
call PolledWait( 0.01 )
call SetUnitInvulnerable( caster, true )
call PauseUnit ( caster, true )
call SetUnitTimeScalePercent( caster, 200.00 )
call AddSpecialEffectTarget ( "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl", caster, "hand, right" )
set eff = GetLastCreatedEffectBJ()
call AddSpecialEffectTarget ( "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl", caster, "hand, left" )
set eff2 = GetLastCreatedEffectBJ()
loop
exitwhen i >= iloop
call TriggerSleepAction( 0.20 )
call SetUnitAnimation( caster, "attack" )
set TargetLoc1 = GetUnitLoc(target)
call SetUnitPositionLocFacingLocBJ( caster, TargetLoc1, TargetLoc1 )
call SetUnitFacingToFaceUnitTimed( caster, target, 0 )
call UnitDamageTargetBJ( caster, target, 50.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "origin", caster, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectTargetUnitBJ( "chest", target, "Objects\\Spawnmodels\\Critters\\Albatross\\CritterBloodAlbatross.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
if ( Trig_Shdow_Fury_Func011Func012C() ) then
call SetUnitFacingToFaceUnitTimed( caster, target, 0 )
call SetUnitAnimation( caster, "attack" )
call PauseUnitBJ( true, udg_UnitVarTarget )
call SetUnitTimeScalePercent( caster, 25.00 )
call SetUnitTimeScalePercent( target, 10.00 )
call PolledWait( 1.85 )
call SetUnitAnimation( target, "death" )
call AddSpecialEffectTargetUnitBJ( "chest", target, "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set TargetLoc2 = GetUnitLoc(target)
call AddSpecialEffectLocBJ( TargetLoc2, "Abilities\\Weapons\\MeatwagonMissile\\MeatwagonMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call SetUnitTimeScalePercent( target, 100.00 )
call PolledWait( 0.01 )
call ExplodeUnitBJ( target )
call PauseUnitBJ( false, target )
call PolledWait( 1.00 )
call ResetUnitAnimation( caster )
call SetUnitInvulnerable( caster, false )
call PauseUnitBJ( false, caster )
call SetUnitTimeScalePercent( caster, 100.00 )
call DestroyEffectBJ( udg_SpecialEffect[1] )
call DestroyEffectBJ( udg_SpecialEffect[2] )
return
else
endif
set i = i + 1
endloop
call SetUnitInvulnerable( caster, false )
call PauseUnitBJ( false, caster )
call ResetUnitAnimation( caster )
call SetUnitTimeScalePercent( caster, 100.00 )
call DestroyEffectBJ( udg_SpecialEffect[1] )
call DestroyEffectBJ( udg_SpecialEffect[2] )
endfunction
//===========================================================================
function InitTrig_Shdow_Fury takes nothing returns nothing
set gg_trg_Shdow_Fury = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shdow_Fury, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shdow_Fury, Condition( function Trig_Shdow_Fury_Conditions ) )
call TriggerAddAction( gg_trg_Shdow_Fury, function Trig_Shdow_Fury_Actions )
endfunction
-
Shadow Fury
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Shadow Fury
-
Actions
- Set UnitVarCaster = (Triggering unit)
- Set UnitVarTarget = (Target unit of ability being cast)
- Wait 0.01 game-time seconds
- Unit - Make UnitVarCaster Invulnerable
- Unit - Pause UnitVarCaster
- Animation - Change UnitVarCaster's animation speed to 200.00% of its original speed
- Special Effect - Create a special effect attached to the hand, right of UnitVarCaster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
- Set SpecialEffect[1] = (Last created special effect)
- Special Effect - Create a special effect attached to the hand, left of UnitVarCaster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
- Set SpecialEffect[2] = (Last created special effect)
-
For each (Integer A) from 1 to 20, do (Actions)
-
Loop - Actions
- Wait 0.20 seconds
- Animation - Play UnitVarCaster's attack animation
- Set TempLoc01 = (Position of UnitVarTarget)
- Set TempLoc02 = (Random point in (Region centered at TempLoc01 with size (70.00, 70.00)))
- Unit - Move UnitVarCaster instantly to TempLoc02, facing TempLoc01
- Unit - Make UnitVarCaster face UnitVarTarget over 0.00 seconds
- Unit - Cause UnitVarCaster to damage UnitVarTarget, dealing 50.00 damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the origin of UnitVarCaster using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the chest of UnitVarTarget using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
- Special Effect - Destroy (Last created special effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of UnitVarTarget) Less than 60.00
-
Then - Actions
- Unit - Make UnitVarCaster face UnitVarTarget over 0.00 seconds
- Animation - Play UnitVarCaster's attack animation
- Unit - Pause UnitVarTarget
- Animation - Change UnitVarCaster's animation speed to 25.00% of its original speed
- Animation - Change UnitVarTarget's animation speed to 25.00% of its original speed
- Wait 1.85 game-time seconds
- Animation - Play UnitVarTarget's death animation
- Special Effect - Create a special effect attached to the head of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the chest of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the origin of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the hand, left of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Special Effect - Create a special effect attached to the hand, right of UnitVarTarget using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Set TempLoc03 = (Position of UnitVarTarget)
- Special Effect - Create a special effect at TempLoc03 using Abilities\Weapons\MeatwagonMissile\MeatwagonMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Animation - Change UnitVarTarget's animation speed to 100.00% of its original speed
- Wait 0.01 game-time seconds
- Unit - Explode UnitVarTarget
- Unit - Unpause UnitVarTarget
- Wait 1.00 game-time seconds
- Animation - Reset UnitVarCaster's animation
- Unit - Make UnitVarCaster Vulnerable
- Unit - Unpause UnitVarCaster
- Animation - Change UnitVarCaster's animation speed to 100.00% of its original speed
- Special Effect - Destroy SpecialEffect[1]
- Special Effect - Destroy SpecialEffect[2]
- Custom script: call RemoveLocation (udg_TempLoc01)
- Custom script: call RemoveLocation (udg_TempLoc02)
- Custom script: call RemoveLocation (udg_TempLoc03)
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Unit - Make UnitVarCaster Vulnerable
- Unit - Unpause UnitVarCaster
- Animation - Reset UnitVarCaster's animation
- Animation - Change UnitVarCaster's animation speed to 100.00% of its original speed
- Special Effect - Destroy SpecialEffect[1]
- Special Effect - Destroy SpecialEffect[2]
- Custom script: call RemoveLocation (udg_TempLoc01)
- Custom script: call RemoveLocation (udg_TempLoc02)
-
Events
-BZR-
Last edited: