--[[This is what goes inside of a dynamic always active entity.--]]
 
g_vindicator_mbt=0

-------------------- HUD Locations and Sizes --------------------

 	-- HUD BG --
    --sprite location
    local HUD_spr_posx = 0
    local HUD_spr_posy = 0
    --sprite size
    local HUD_spr_sizex = 100
    local HUD_spr_sizey = 100
 
function vindicator_mbt_init(e)
	
			-- HUD BG --
    HUD_sprite = LoadImage("scriptbank\\images\\vindicator_mbt\\000.png")--location of the HUD
    HUD_icon = CreateSprite(HUD_sprite)
    SetSpriteSize (HUD_icon,HUD_spr_sizex,HUD_spr_sizey)   
    SetSpriteDepth (HUD_sprite, 100)
    SetSpritePosition(HUD_icon,300,300)
	


	
end
local mod = math.modf
 
function vindicator_mbt_main(e)

-------------------- HUD BG --------------------	
	 if GetScancode() == 2 then PlaySound(e,1)--gun sound
	 end
	 if GetScancode() == 3 then PlaySound(e,0)--rocket sound	
	 end

g_mech=1
	if g_mech == 1 then
       PasteSpritePosition(HUD_icon,HUD_spr_posx,HUD_spr_posy)	   
		  HideHuds()	
	AddPlayerWeapon(30)--gun added from map
	AddPlayerWeapon(43)--gun2 added from map
	
		PositionCamera( 0, g_PlayerPosX, g_PlayerPosY + 50, g_PlayerPosZ)
	end
if g_KeyPressW == 1 or g_KeyPressS == 1 or g_KeyPressA == 1 or g_KeyPressD == 1 then
LoopSound(e,2)-- footfall sound
stopped_moving = 1
else
StopSound(e,2) -- stop footfall sound 
if stopped_moving == 1 then
  PlaySound(e,3)--play engine winddown sound
  stopped_moving = 0
  
  
  end	
 end
end
