ShadowInTheD
Active Member
- Reaction score
- 12
I basically have 2 triggers, one is supposed to make a wisp for each user, and set the wisp = udg_TempUnit in a loop, and it's supposed to create a repeating timer. The first trigger sets up the second. The second uses the location of udg_TempUnit to move the unit to it's location offset by 10 facing it's direction, and it's supposed to check this every 3 seconds. Is there any problems, and if so, can you help me? Thanks in advance, + Rep
EDIT: There's 2 things that aren't actually happening, the text in the second trigger isn't displaying, and the units don't slide!
Here are my 2 triggers
EDIT: There's 2 things that aren't actually happening, the text in the second trigger isn't displaying, and the units don't slide!
Here are my 2 triggers
JASS:
function Test_My_Skills_Actions takes nothing returns nothing
local integer i = 0
local integer I = GetPlayers()
local location l = GetRectCenter(GetPlayableMapRect())
loop
exitwhen i>I
if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
call CreateNUnitsAtLoc(1,039;ewsp039;,Player(i),l,bj_UNIT_FACING)
set udg_TempUnit<i> = GetLastCreatedUnit()
call DisplayTextToForce (GetPlayersAll(),"A Wisp has been created for " + GetPlayerName(Player(i)) )
set i = i + 1
endif
endloop
call StartTimerBJ(udg_Timer,true,.03)
call RemoveLocation( l )
endfunction
//=======================
function InitTrig_Test_My_Skills takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,Player(0),"-start",true)
call TriggerAddAction(t, function Test_My_Skills_Actions)
endfunction</i>
JASS:
function Ice_Skating_Actions takes nothing returns nothing
local location l
local integer i = 0
local integer I = GetPlayers()
loop
exitwhen i>I
set l = GetUnitLoc(udg_TempUnit<i>)
if GetTerrainTypeBJ(l) == 039;Nice039; then
call SetUnitPositionLoc(udg_TempUnit<i>,PolarProjectionBJ(l,10,bj_UNIT_FACING))
set i = i + 1
call RemoveLocation(l)
call DisplayTextToForce(GetPlayersAll(),"Does this work???")
endif
endloop
endfunction
//=====================================
function InitTrig_Ice_Skating takes nothing returns nothing
local trigger p = CreateTrigger()
call TriggerRegisterTimerExpireEvent(p,udg_Timer)
call TriggerAddAction(p,function Ice_Skating_Actions)
endfunction</i></i>