works pretty well, with some bullet feedback so we can draw air motion or just actual projectile bullets this would be really nice.
it's pretty simple script with the modulatespeed command doing most of the work, just a little extra needed for ranged characters to control their firing speed
g_bullet_time_quantity = 5
g_bullet_time = 0
max_bullet_time = 3000
bullet_time_speed = 0.2
bt_pressed = 0
function bullet_time_init(e)
end
function bullet_time_main(e)
if g_Scancode == 16 and bt_pressed == 0 then
bt_pressed = 1
if g_bullet_time_quantity > 0 then
g_bullet_time_quantity = g_bullet_time_quantity - 1
g_bullet_time = 1
bullet_time_mod = (1-bullet_time_speed)*10
else
PromptDuration("No bullet time available",2000)
end
end
if g_bullet_time > 0 then
Prompt("Bullet time "..round(((max_bullet_time-g_bullet_time)/100)).."s")
if g_bullet_time < max_bullet_time then
g_bullet_time = g_bullet_time + 1
for a = 1, 9999 do
if g_Entity[a] ~= nil then
ModulateSpeed(a,bullet_time_speed)
end
end
else
for a = 1, 9999 do
if g_Entity[a] ~= nil then
ModulateSpeed(a,1)
bullet_time_mod = 1
end
end
g_bullet_time = 0
end
end
Panel(80,70,99,85)
TextCenterOnX(89,74,3,"Bullet time remaining")
TextCenterOnX(89,79,3,g_bullet_time_quantity)
if g_Scancode == 0 then
bt_pressed = 0
end
end
function bullet_time_exit(e)
end
function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end