Actually I was looking at that x-ray post script you posted, and I was thinking can't you just use the same toggle part..
Code:
if not _markingToggle then _marktoggle = nil _markingToggle = true
else _markingToggle = nil
end
if not _gameUpdate then _gameUpdate = GameSetup.update
end
do
local _gameUpdateLastMark
function GameSetup:update( t, dt )
_gameUpdate(self, t, dt)
_gameUpdateLastMark = t
if _markingToggle then
mark_enemies()
else
if not _marktoggle then
_marktoggle = true
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.unit:contour():remove( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
u_data.unit:contour():remove( "mark_enemy" )
end
end
end
end
end
of course changing some things, sorry I'm not a lua person, I'm barely learning java xD
so then I guess we can try to do
Code:
if not _markingToggle then _marktoggle = nil _markingToggle = true
else _markingToggle = nil
end
if not _gameUpdate then _gameUpdate = GameSetup.update
end
do
local _gameUpdateLastMark
function GameSetup:update( t, dt )
_gameUpdate(self, t, dt)
_gameUpdateLastMark = t
if _markingToggle then
NetworkAccountSTEAM:username_id()
else
if not _marktoggle then
_marktoggle = true
for u_key,u_data in pairs(NetworkAccountSTEAM:username_id()) do
u_data.unit:contour():remove( "Master Bates" )
end
end
end
end
end
lol, its just a wild guess, and I should try it first, but I'm kinda multi tasking here doing both my programming homework and this :c will check in a bit to see if it works
edit: doesn't work lol will fix it later, but I was getting
changename.lua:8: attempt to index global 'GameSetup' (a nil value)