Using this entity based physics-active script at the moment for my hud but would like it to simply switch between 2 images by pressing "E" at anytime....get player distance not needed! Just 2 images like reading a note but whenever player chooses to!
--Simple animated hud script Adapted from Rolfy's Animated Night Vision Script and the bbHelmet script by sHn33Ky.Select number of images and set time delay
local time1 = 0
local time2 = g_Time
local timepassed = time2 - time1
local imagenumber = 0
--change to however many different images you have
local max_images = 1
local delay = 0.60
local pressed = 0
local subhud_on = 0
function subhud_init(e)
LoadImages("subhud",0)
SetImagePosition(0,0)
SetImageAlignment(1)
end
function subhud_main(e)
if subhud_on == 1 then
end
if time1 == 0 then
time1 = g_Time
end
time2 = g_Time
timepassed = (time2 - time1) / 1000
if timepassed >= delay then
ShowImage(imagenumber)
time1 = 0
if imagenumber < max_images - 1 then
imagenumber = imagenumber + 1
else
imagenumber = 0
end
end
end
appreciate any help....
Processor: Intel(R) i7-4700MQ CPU @ 2.40GHz 2.40 GHz Installed memory (RAM): 16.0 GB (15.8 GB usable) System type: 64-bit Operating System,x64-based processor
Start the day by righting your wrongs then end you day right so you don't have to do it again tomorrow ...
sHn33Ky