hi all.
i have downloaded the free stuff of CosmicProphet. so i wanted to use the traffic light. In the download files i do not have the script for the traffic light. So i want to make my own script. i have used the ai_viewanimations the see the animation frames. the frames from 0 to 918 is the one's i want to use. i have change the frames in the fpe to :
;Animationinfo
animmax = 1
anim0 = 0,918
my script that i want to use is this:
function trafficlight_init(e)
end
function trafficlight_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 900 and g_PlayerHealth > 0 then
GetEntityPlayerVisibility(e)
if g_Entity[e]['plrvisible'] == 1 then
SetAnimation(0)
PlayAnimation(e)
end
end
end
But it does not work. . Please can someone tel me what am i doing wrong.
i want the traffic light just to loop the animation from 0 to 918 constantly when the player is in range.
i have tried the loop function also, but it do not work.
Thanks for any help.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11