Tyman2007
Ya Rly >.
- Reaction score
- 74
Ok, i know i double threaded, but im new and i wouldnt know how to delete my previous topic on a different forum.. but i posted in wrong section.. sorry.. now to the point.
Well, as you can see i have a problem right now.
My problem is that with this hybrid trigger to use features that can only be done with JASS, like if a lightning variable == null.
Anyway.. I was going to have a spell that starts off with THE_X's revolving axes trigger, then move to form a cross and i dont want to explain the rest..
ANYWAY.. again.. The trigger was working fine, they spun around, then i wanted to add some lightning effects as a visual bonus, then when i tried to make it so that the units would stop after a full 360 degree revolution then delete the lightning effects, the units are created but dont do anything.
This is the trigger i am having problems with:
This is the trigger which initializes it all:
I am not very good at JASS so its not like one of those fancy spell codes... i dont know how to read them and i dont know how to learn them..
Well, as you can see i have a problem right now.
My problem is that with this hybrid trigger to use features that can only be done with JASS, like if a lightning variable == null.
Anyway.. I was going to have a spell that starts off with THE_X's revolving axes trigger, then move to form a cross and i dont want to explain the rest..
ANYWAY.. again.. The trigger was working fine, they spun around, then i wanted to add some lightning effects as a visual bonus, then when i tried to make it so that the units would stop after a full 360 degree revolution then delete the lightning effects, the units are created but dont do anything.
This is the trigger i am having problems with:
JASS:
function Trig_Holy_Cross_Part_2_Func002Func004Func002C takes nothing returns boolean
return udg_Angle[GetUnitUserData(GetEnumUnit())] <= 180.00 == true
endfunction
function Trig_Holy_Cross_Part_2_Func002A takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local lightning L
local integer i = GetUnitUserData(u)
local integer I
local integer ii
local integer e
if ( I <= 357 ) then
set I = I + 3
set udg_Angle<i> = ( udg_Angle<i> + 3.00 )
set udg_Point[1] = GetUnitLoc(udg_Unit[GetUnitUserData(u)])
set udg_Point[2] = PolarProjectionBJ(udg_Point[1], 500.00, udg_Angle<i>)
if ( udg_Lightning<i> == null ) then
if ( Trig_Holy_Cross_Part_2_Func002Func004Func002C() ) then
set udg_OppAngle<i> = ( udg_Angle<i> + 180.00 )
else
set udg_OppAngle<i> = ( udg_Angle<i> - 180.00 )
endif
set L = GetLastCreatedLightningBJ()
call AddLightningLoc( "CLPB", l, PolarProjectionBJ(l, 500, udg_OppAngle<i>) )
set udg_Lightning<i> = L
else
call MoveLightningLoc( udg_Lightning<i>, udg_Point[2], PolarProjectionBJ(GetRectCenter(GetPlayableMapRect()), 500.00, udg_OppAngle<i>) )
endif
call SetUnitPositionLoc( u, udg_Point[2] )
call RemoveLocation (udg_Point[1])
call RemoveLocation (udg_Point[2])
call RemoveLocation (l)
else
set ii = (GetUnitUserData(udg_LCU) - 29)
set e = (GetUnitUserData(udg_LCU) - 29)
loop
call DestroyLightning(udg_Lightning[e])
exitwhen e == (ii + 29)
set e = (e + 1)
endloop
endif
endfunction
function Trig_Holy_Cross_Part_2_Actions takes nothing returns nothing
local group g = GetUnitsOfTypeIdAll(039;h000039;)
call ForGroupBJ( g, function Trig_Holy_Cross_Part_2_Func002A )
call DestroyGroup (g)
endfunction
//===========================================================================
function InitTrig_Holy_Cross_Part_2 takes nothing returns nothing
set gg_trg_Holy_Cross_Part_2 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Holy_Cross_Part_2, 0.03 )
call TriggerAddAction( gg_trg_Holy_Cross_Part_2, function Trig_Holy_Cross_Part_2_Actions )
endfunction
</i></i></i></i></i></i></i></i></i></i></i></i>
This is the trigger which initializes it all:
Code:
Holy Cross Part 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Holy Cross
Actions
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Set Point[1] = (Position of (Triggering unit))
Unit - Create 1 Peasant for (Owner of (Triggering unit)) at Point[1] facing Default building facing degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Last created unit)) Less than 1
Then - Actions
Set Integer = (Integer + 1)
Unit - Set the custom value of (Last created unit) to Integer
Set Unit[(Custom value of (Last created unit))] = (Triggering unit)
Else - Actions
Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
Set LCU = (Last created unit)
Set Angle[(Custom value of (Last created unit))] = (24.00 x (Real((Integer A))))
Custom script: call RemoveLocation(udg_Point[1])
I am not very good at JASS so its not like one of those fancy spell codes... i dont know how to read them and i dont know how to learn them..