- Joined
- Apr 1, 2019
- Messages
- 156
I can't seem to get this to work, all it ever prints is "2" gets stuck on
if IsUnitType(u, UNIT_TYPE_STRUCTURE) == false then
if IsUnitType(u, UNIT_TYPE_STRUCTURE) == false then
Lua:
function PortalActions (L, PG)
print ("2")
local u = GetTriggeringUnit()
local n = GetUnitTypeId(u)
if IsUnitType(u, UNIT_TYPE_STRUCTURE) == false then
print ("true 1")
if IsUnitInGroup(u, udg_PortalUnitGroup[PG]) == false then
print ("true 2")
if n ~= FourCC('n058') then
print ("true 3")
if n ~= FourCC('n054') then
print ("true 4")
if n ~= FourCC('n055') then
print ("true 5")
if n ~= FourCC('n052') then
print ("true 6")
if n ~= FourCC('n051') then
print ("true 7")
if n ~= FourCC('n053') then
print ("true 8")
if n ~= FourCC('n057') then
print ("true 9")
if n ~= FourCC('n056') then
print ("true 10")
if n ~= FourCC('n04A') then
print ("good")
local c = GetUnitUserData(u)
for P = 0, 11 do
if c >= 1 + (P * 6 ) and
c <= 6 + (P * 6 ) then
if L % 2 == 0 then
local Int = L + (P * 10)
local Snd = Int - 1
else
local Int = L + (P * 10)
local Snd = Snd + 1
end
print ("loop")
GroupAddUnitSimple( u, udg_PortalUnitGroup[PG] )
AddSpecialEffectLocBJ(udg_PortalPoint[Int], "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl")
DestroyEffectBJ( GetLastCreatedEffectBJ() )
AddSpecialEffectLocBJ( udg_PortalPoint[Snd], "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
DestroyEffectBJ( GetLastCreatedEffectBJ() )
SetUnitX(u, GetLocationX(udg_PortalPoint[Snd]))
SetUnitY(u, GetLocationY(udg_PortalPoint[Snd]))
AddLightningLoc( FourCC("MFPB"), udg_PortalPoint[Int], udg_PortalPoint[Snd])
local light = GetLastCreatedLightningBJ()
SetLightningColorBJ(light, 0.10, 0.10, 1, 1)
local t = CreateTimer()
TimerStart(t, 0.20, false, function()
DestroyLightning(light)
PauseTimer(t)
DestroyTimer(t)
end)
break
end
end
end
end
end
end
end
end
end
end
end
end
end
end