Hi guys,
I'm trying to make a script that is attached to an animated character, if you get within 1500 of the character it should play a sound, then if you get under 1000 then it will play an animation (it turns and walks away), then after one run of the animation it destroys the character.
Basically I want the character to make a noise when your under 1500 and then walk off and disappear when you get under 1000.
But it just doesn't do anything.
Anyone know what I need to do to get this working?
function sneakaway_init(e)
end
function sneakaway_main(e)
PlayerDist = GetPlayerDistance(e)
Prompt (PlayerDist)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 1500 and g_PlayerHealth > 0 then
PlaySound(e,1)
end
if PlayerDist < 1000 and g_PlayerHealth > 0 then
SetAnimationFrames(34,54)
PlayAnimation(e)
end
end
function sneakaway_exit(e)
Destroy(e)
end
i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.