Page 1 of 1

(LUA) Kill those pesky subs

Posted: Mon Nov 16, 2009 11:01 pm
by MickCrozier
This little gem kills all the subs on the current look page (except inhibitive subs). Great for busking when you hear the dreaded 'BLACKOUT!' call

Code: Select all

LPname = HC.GetProperty('system','currentlookpage','name')
n = #LPname
while n > 0 and LPname:find("^%s", n) do n = n - 1 end
LPname = LPname:sub(1, n)

for i = 0,63 do	-- (high number needs to be 'number of subs on your console' minus 1)	
  Ltype = HC.GetProperty('look', LPname, i,'type')
  Lnumber = HC.GetProperty('look', LPname, i,'number')

  if Ltype == '2' then
    --HC.LookFade(LPname,Lnumber,100,1) -- INHIBITIVE (uncomment to send to full)
  else
    HC.LookFade(LPname,Lnumber,0,1)
  end
end

Re: (LUA) Kill those pesky subs

Posted: Sat Nov 21, 2009 10:29 pm
by RobertBell
Nice one!