T.s.e
Wish I was old and a little sentimental
- Reaction score
- 133
Did you make a function called Slide above the function where you call TimerStart()?
scope Lightnings
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;AEfk039;
endfunction
//Here?
private function Actions takes nothing returns nothing
local real real1 = GetUnitFacing(GetTriggerUnit())
local location point1 = GetUnitLoc(GetTriggerUnit())
local location point2 = PolarProjectionBJ(point1,300,real1+145)
local location point3 = PolarProjectionBJ(point1,300,real1+180)
local location point4 = PolarProjectionBJ(point1,300,real1+215)
local unit Unit = GetTriggerUnit()
local timer SlideTimer
local lightning lightning1
local lightning lightning2
local lightning lightning3
local real realD1
local real realD2
call TriggerSleepAction (0.1)
call AddSpecialEffectLocBJ(point2,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point3,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point4,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call PauseUnit (GetTriggerUnit(), true)
call AddLightningLoc ("CLPB", point2,point1)
//set lightning1 (GetLastCreatedLightningBJ)
call AddLightningLoc ("CLPB", point3,point1)
call AddLightningLoc ("CLPB", point4,point1)
call TriggerSleepAction (1.00)
call DestroyLightning (lightning1)
call CreateUnitAtLoc (GetOwningPlayer(GetTriggerUnit()),039;h000039;,(point1),0)
call PauseUnit (GetTriggerUnit(), false)
call TimerStart (SlideTimer,0.03,true, function Slide)
//loop
// exitwhen realD1 > realD2
// set point1 = (GetTriggerUnitLoc())
// endloop
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition (trig, Condition (function Conditions ) )
call TriggerAddAction (trig, function Actions )
endfunction
endscope
scope Lightnings
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;AEfk039;
endfunction
private function Slide takes nothing returns nothing
local location point5 = GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(point5,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
endfunction
private function Actions takes nothing returns nothing
local real real1 = GetUnitFacing(GetTriggerUnit())
local location point1 = GetUnitLoc(GetTriggerUnit())
local location point2 = PolarProjectionBJ(point1,300,real1+145)
local location point3 = PolarProjectionBJ(point1,300,real1+180)
local location point4 = PolarProjectionBJ(point1,300,real1+215)
local unit Unit = GetTriggerUnit()
local timer SlideTimer
local lightning lightning1
local lightning lightning2
local lightning lightning3
local real realD1
local real realD2
call TriggerSleepAction (0.1)
call AddSpecialEffectLocBJ(point2,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point3,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point4,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call PauseUnit (GetTriggerUnit(), true)
call AddLightningLoc ("CLPB", point2,point1)
//set lightning1 (GetLastCreatedLightningBJ)
call AddLightningLoc ("CLPB", point3,point1)
call AddLightningLoc ("CLPB", point4,point1)
call TriggerSleepAction (1.00)
call DestroyLightning (lightning1)
call CreateUnitAtLoc (GetOwningPlayer(GetTriggerUnit()),039;h000039;,(point1),0)
call PauseUnit (GetTriggerUnit(), false)
call TimerStart (SlideTimer,1.00,true, function Slide)
//loop
// exitwhen realD1 > realD2
// set point1 = (GetTriggerUnitLoc())
// endloop
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition (trig, Condition (function Conditions ) )
call TriggerAddAction (trig, function Actions )
endfunction
endscope
call BJDebugMsg ("This part works")
private function Slide takes nothing returns nothing
local location point5 = GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(point5,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
endfunction
scope Lightnings
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;AEfk039;
endfunction
private function Slide takes nothing returns nothing
local location temp1 = GetUnitLoc(GetTriggerUnit())
local location temp2 = PolarProjectionBJ(temp1,50,0)
call SetUnitPositionLoc(dummy(),temp2)
call BJDebugMsg ("This part also works wohoo")
endfunction
private function Actions takes nothing returns nothing
local real real1 = GetUnitFacing(GetTriggerUnit())
local location point1 = GetUnitLoc(GetTriggerUnit())
local location point2 = PolarProjectionBJ(point1,300,real1+145)
local location point3 = PolarProjectionBJ(point1,300,real1+180)
local location point4 = PolarProjectionBJ(point1,300,real1+215)
local unit Unit = GetTriggerUnit()
local timer SlideTimer = CreateTimer()
local real realD1
local real realD2
globals
unit dummy
unit caster
endglobals
call BJDebugMsg ("This part works")
call TriggerSleepAction (0.1)
call AddSpecialEffectLocBJ(point2,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point3,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point4,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call PauseUnit (GetTriggerUnit(), true)
call AddLightningLoc ("CLPB", point2,point1)
call AddLightningLoc ("CLPB", point3,point1)
call AddLightningLoc ("CLPB", point4,point1)
call TriggerSleepAction (1.00)
call CreateUnitAtLoc (GetOwningPlayer(GetTriggerUnit()),039;h000039;,(point1),0)
call set dummy (GetLastCreatedUnit)
call PauseUnit (GetTriggerUnit(), false)
call TimerStart (SlideTimer,3.00,true, function Slide)
//loop
// exitwhen realD1 > realD2
// set point1 = (GetTriggerUnitLoc())
// endloop
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition (trig, Condition (function Conditions ) )
call TriggerAddAction (trig, function Actions )
endfunction
endscope
local unit Dummy
set Dummy = CreateUnitAtLoc (GetOwningPlayer(GetTriggerUnit()),039;h000039;,(point1),0)
set dummy = CreateUnitAtLoc (GetOwningPlayer(GetTriggerUnit()),039;h000039;,(point1),0)
dummy()
scope Lightnings
globals
unit dummy
unit caster
unit target
location targetloc
endglobals
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;AEfk039;
endfunction
private function Slide takes nothing returns nothing
local location temp1 = GetUnitLoc(dummy)
local location temp2 = PolarProjectionBJ(temp1,50,0)
local location temp3 = GetUnitLoc(target)
local real angle
targetloc = GetUnitLoc(target) //this
set udg_angle = AngleBetweenPoints(temp1,temp3) //this
call SetUnitPositionLoc(dummy,temp2)
call BJDebugMsg ("This part also works wohoo")
endfunction
private function Actions takes nothing returns nothing
local real real1 = GetUnitFacing(GetTriggerUnit())
local location point1 = GetUnitLoc(GetTriggerUnit())
local location point2 = PolarProjectionBJ(point1,300,real1+145)
local location point3 = PolarProjectionBJ(point1,300,real1+180)
local location point4 = PolarProjectionBJ(point1,300,real1+215)
local unit Unit = GetTriggerUnit()
local timer SlideTimer = CreateTimer()
local real realD1
local real realD2
set udg_target = (GetSpellTargetUnit) // and this
call BJDebugMsg ("This part works")
call TriggerSleepAction (0.1)
call AddSpecialEffectLocBJ(point2,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point3,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call AddSpecialEffectLocBJ(point4,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call PauseUnit (GetTriggerUnit(), true)
call AddLightningLoc ("CLPB", point2,point1)
call AddLightningLoc ("CLPB", point3,point1)
call AddLightningLoc ("CLPB", point4,point1)
call TriggerSleepAction (1.00)
set dummy = CreateUnitAtLoc (GetOwningPlayer(GetTriggerUnit()),039;h000039;,(point1),0)
call PauseUnit (GetTriggerUnit(), false)
call TimerStart (SlideTimer,0.05,true, function Slide)
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition (trig, Condition (function Conditions ) )
call TriggerAddAction (trig, function Actions )
endfunction
endscope