cleeezzz
The Undead Ranger.
- Reaction score
- 268
original GUI
(In my attempt)
im stuck on multiple things..
function Trig_Holy_Arrow_vJASS_Func002Func001Func001C takes nothing returns boolean
if ( not ( TimerGetRemaining(udg_Holy_Arrow_Timer[udg_P]) > 0.01 ) ) then
(Btw, i was forced to use a timer in GUI for MPI, im hoping to get rid of it if possible)
and how do i do multiple conditions?
private function Conditions takes nothing returns boolean
OR-
return GetSpellAbilityId() == 'A00C'
return GetSpellAbilityId() == 'A00W'
endfunction
also, how do i move stuff to the top (ive seen spells where they list all variables in the beginning to make it look cleaner)
and last but not least, millions of syntax errors =/
Code:
Holy Arrow
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
(Ability being cast) Equal to Holy Arrow
(Ability being cast) Equal to Holy Arrow (Archer Mastery 1)
Actions
For each (Integer P) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to (Player(P))
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Remaining time for Holy_Arrow_Timer[P]) Greater than 0.01
Then - Actions
Custom script: call RemoveLocation(udg_Holy_Arrow_Position[udg_P])
Custom script: call RemoveLocation(udg_Holy_Arrow_Spot[udg_P])
Else - Actions
Set HolyArrowOwner[P] = (Triggering unit)
Set Holy_Arrow_Position[P] = (Position of HolyArrowOwner[P])
Set Shake_Group[P] = (Units within 4000.00 of Holy_Arrow_Position[P])
Unit Group - Pick every unit in Shake_Group[P] and do (Actions)
Loop - Actions
Camera - Shake the camera for (Owner of (Picked unit)) with magnitude 50.00
Custom script: call DestroyGroup(udg_Shake_Group[udg_P])
Special Effect - Create a special effect at Holy_Arrow_Position[P] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at Holy_Arrow_Position[P] using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at Holy_Arrow_Position[P] using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
Environment - Create a 4.00 second Depression ripple deformation at Holy_Arrow_Position[P] with starting radius 500.00, ending radius 2000.00, and depth 60.00, using 0.50 second ripples spaced 1000.00 apart
Unit - Set life of HolyArrowOwner[P] to 100.00%
Set Holy_Arrow_Spot[P] = (Target point of ability being cast)
Unit - Create 1 Holy Arrow Dummy for (Owner of HolyArrowOwner[P]) at Holy_Arrow_Position[P] facing Holy_Arrow_Spot[P]
Set Holy_Dummy[P] = (Last created unit)
Unit - Add a 7.00 second Generic expiration timer to Holy_Dummy[P]
Unit - Set level of Flame Strike (holy arrow) for Holy_Dummy[P] to (Level of (Ability being cast) for HolyArrowOwner[P])
Set Holy_Fire_Offset[P] = 250
Set Holy_Fire_Offset_Max[P] = (1500 + (500 x (Level of (Ability being cast) for HolyArrowOwner[P])))
Countdown Timer - Start Holy_Arrow_Timer[P] as a Repeating timer that will expire in 0.27 seconds
Unit - Create 1 Holy Arrow Dummy for (Player(P)) at Holy_Arrow_Position[P] facing Holy_Arrow_Spot[P]
Set Shockwave_Dummy[P] = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Set level of Holy Arrow (Dummy) (Cairne) for Shockwave_Dummy[P] to (Level of (Ability being cast) for HolyArrowOwner[P])
Unit - Order Shockwave_Dummy[P] to Orc Tauren Chieftain - Shockwave Holy_Arrow_Spot[P]
Else - Actions
(In my attempt)
JASS:
scope HolyArrowvJASS
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A00C039; or GetSpellAbilityId() == 039;A00W039;
endfunction
function Trig_Holy_Arrow_vJASS_Func002Func001Func001C takes nothing returns boolean
if ( not ( TimerGetRemaining(udg_Holy_Arrow_Timer[udg_P]) > 0.01 ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Arrow_vJASS_Func002Func001Func005A takes nothing returns nothing
call CameraSetEQNoiseForPlayer( GetOwningPlayer(GetEnumUnit()), 50.00 )
endfunction
function Trig_Holy_Arrow_vJASS_Func002Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == ConvertedPlayer(i) ) ) then
return false
endif
return true
endfunction
private function Actions takes nothing returns nothing
local integer i = 1
loop
exitwhen i > 12
if ( Trig_Holy_Arrow_vJASS_Func002Func001C() ) then
if ( Trig_Holy_Arrow_vJASS_Func002Func001Func001C() ) then
call RemoveLocation(udg_Holy_Arrow_Position[udg_P])
call RemoveLocation(udg_Holy_Arrow_Spot[udg_P])
else
endif
local unit Caster = GetTriggerUnit()
local location Caster_Loc = GetUnitLoc(Caster)
local unit group Shake_Group = GetUnitsInRangeOfLocAll(4000.00, Caster_Loc)
call ForGroupBJ(unit group Shake_Group, function Trig_Holy_Arrow_vJASS_Func002Func001Func005A )
call DestroyGroup(unit group Shake_Group)
call AddSpecialEffectLocBJ( "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", location Caster_Loc )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLoc( "Abilities\\Spells\\Orc\\AncestralSpirit\\AncestralSpiritCaster.mdl", location Caster_Loc )
call DestroyEffect( GetLastCreatedEffectBJ() )
call AddSpecialEffectLoc( "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl", location Caster_Loc )
call DestroyEffect( GetLastCreatedEffectBJ() )
call TerrainDeformationRippleBJ( 4.00, true, location Caster_Loc, 500.00, 2000.00, 60.00, 0.50, 1000.00 )
call SetUnitLifePercentBJ( unit Caster, 100 )
local location Cast_Point = GetSpellTargetLoc()
call CreateNUnitsAtLoc( 1, 039;h000039;, GetOwningPlayer(unit Caster), location Caster_Loc , AngleBetweenPoints(location Caster_Loc, location Cast_Point)
local unit Dummy = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 7.00, 039;BTLF039;, unit Dummy )
call SetUnitAbilityLevel( unit Dummy, 039;A00A039;, GetUnitAbilityLevel(unit Caster, GetSpellAbilityId())
local real Holy_Fire_Offset = 250.
local real Holy_Fire_Offset_Max = ( 1500 + ( 500 * GetUnitAbilityLevel(unit Caster, GetSpellAbilityId())) )
call StartTimerBJ( udg_Holy_Arrow_Timer[udg_P], true, 0.27 )
call CreateNUnitsAtLocFacingLocBJ( 1, 039;h000039;, ConvertedPlayer(integer i), location Caster_Loc, location Cast_Point )
local unit Dummy2 = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 5.00, 039;BTLF039;, GetLastCreatedUnit() )
call SetUnitAbilityLevel( unit Dummy2, 039;A001039;, GetUnitAbilityLevel(unit Caster, GetSpellAbilityId())
call IssuePointOrderLocBJ( unit Dummy2, "shockwave", location Cast_Point )
else
endif
set integer i = integer i + 1
endloop
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger HolyArrowvJASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( HolyArrowvJASS, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( HolyArrowvJASS, Condition( function Conditions ) )
call TriggerAddAction( HolyArrowvJASS, function Actions )
endfunction
endscope
im stuck on multiple things..
function Trig_Holy_Arrow_vJASS_Func002Func001Func001C takes nothing returns boolean
if ( not ( TimerGetRemaining(udg_Holy_Arrow_Timer[udg_P]) > 0.01 ) ) then
(Btw, i was forced to use a timer in GUI for MPI, im hoping to get rid of it if possible)
and how do i do multiple conditions?
private function Conditions takes nothing returns boolean
OR-
return GetSpellAbilityId() == 'A00C'
return GetSpellAbilityId() == 'A00W'
endfunction
also, how do i move stuff to the top (ive seen spells where they list all variables in the beginning to make it look cleaner)
and last but not least, millions of syntax errors =/