hi there! i have modified a script by smallg.
this script means: you have to kill 4 people. when you killed the 4 people you get a new text and a door opens automatically.
this all works great but one problem:
the door animation doesn't stop when i killed the last person. why?
i can change this when i change the
killcount = 4 to
killcount=0 in the last line but then the final text doesn't appear and the killcount is reset to zero.
g_KillCount = 0
function killcount_door_init(e)
end
function killcount_door_main(e)
if g_KillCount < 4 then
TextColor(39,94,3,"Eliminate the 4 inventors! " .. 0 + g_KillCount .. " killed." ,255,255,255)
else
TextColor(20,94,3,"You eliminated the inventors! Now destroy the timebender concepts." ,255,255,255)
if g_Entity[e]['animating'] == 0 then
SetAnimation(0)
PlayAnimation(e)
PlaySound(e,0)
g_Entity[e]['animating'] = 1
CollisionOff(e)
SetActivated(e,1)
g_KillCount = 4
end
end
end
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti