My level won't test game anymore and after much head scratching, I've narrowed it down to a few lines in a 430 line LUA script I wrote to control global sprites like objectives, health and weapon type. Early in the script, I've written this:
if GetPlayerWeaponID() == 19 then
ammotype = Ammo_pistol_spr
elseif GetPlayerWeaponID() ~= 19 then
SetSpritePosition(Ammo_pistol_spr,200,200)
end
if GetPlayerWeaponID() == 15 then
ammotype = Ammo_sniper_spr
elseif GetPlayerWeaponID() ~= 15 then
SetSpritePosition(Ammo_sniper_spr,200,200)
end
if GetPlayerWeaponID() == 62 then
ammotype = Ammo_AK_spr
elseif GetPlayerWeaponID() ~= 62 then
SetSpritePosition(Ammo_AK_spr,200,200)
end
...which defines a global called 'ammotype'. The idea is that the sprite swaps out depending on what weapon you're using. However, Game Guru no longer understands that 'ammotype' has meaning, meaning it now looks for a sprite called 'ammotype'. Here's the offending extract:
if g_PlayerGunCount > 0 then
ammohudstate = 1
end
if ammohudstate == 1 and GetTimer(e) > delay then
StartTimer(e)
ammo_op = ammo_op + 7
if ammo_op >=255 then ammo_op = 255 end
SetSpriteColor(ammotype,255,255,255,ammo_op)
SetSpritePosition(ammotype,85,86)
end
if ammo_op == 255 then ammohudstate = 2 end
if ammohudstate == 2 then
SetSpritePosition(ammotype,85,86)
TextColor(89.8,86.4,5,""..g_PlayerGunAmmoCount.." / "..g_PlayerGunClipCount,255,255,255)
end
if GetPlayerWeaponID() == 0 then
SetSpritePosition(ammotype,200,200)
end
I want to stress that this worked before the 12.05 update. And before you say, yes, 'ammotype = {}' can be found in the first lines of the init (and I've tried shifting it to before the init). Goddamnit Game Guru
AE