P
PegaLeveBrZ
Guest
I've been trying to get a working slide/skate system for days.. and yet, still many problems... :banghead:
I've tried using "MazeTriggers v.1.4.1" by roNiN and I got this code:
I did create an empty "Slide" trigger, custom texted it, pasted the code.
The trigger is there, I can see it, no more compile errors, but nuthin' happens. I've tried changing the Ice Terrain, still nothing.
The name of my Hero is H008:Hblm (Name), so I think I got that right.
Also, the terrain is Underground Ice.
What's wrong?
NOTE: I'm technically a JASS-analphabet.
If anyone knows of an easy to use slide trigger ripped off somewhere or kindly distributed, I will be eternally grateful.
I've tried using "MazeTriggers v.1.4.1" by roNiN and I got this code:
JASS:
function Trig_Slide_Actions takes nothing returns nothing
local group g1
local group g2
local location p
local location p2
local unit u
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 11
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set g1 = GetUnitsOfPlayerAndTypeId(ConvertedPlayer(GetForLoopIndexA()), 039;Hblm039;)
set u = GroupPickRandomUnit(g1)
set p = GetUnitLoc(u)
if ( IsUnitAliveBJ(u) == true ) then
if ( GetTerrainTypeBJ(p) == 039;Glva039; ) then
set p2 = PolarProjectionBJ(p,7, GetUnitFacing(u))
call SetUnitPositionLoc( u, p2 )
call RemoveLocation( p2 )
endif
endif
call RemoveLocation( p )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function InitTrig_Slide takes nothing returns nothing
set gg_trg_Slide = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Slide, 0.02 )
call TriggerAddAction( gg_trg_Slide, function Trig_Slide_Actions )
endfunction
I did create an empty "Slide" trigger, custom texted it, pasted the code.
The trigger is there, I can see it, no more compile errors, but nuthin' happens. I've tried changing the Ice Terrain, still nothing.
The name of my Hero is H008:Hblm (Name), so I think I got that right.
Also, the terrain is Underground Ice.
What's wrong?
NOTE: I'm technically a JASS-analphabet.
If anyone knows of an easy to use slide trigger ripped off somewhere or kindly distributed, I will be eternally grateful.