Jagged Alliance 3

Jagged Alliance 3

Kill Camera Disable
3 条留言
Miczelo  [作者] 8 月 28 日 上午 10:50 
@huyiuhyiu Yes, it can be activated randomly. Modify the Script.lua file in this mod, copy and paste the code below.
You can adjust the 50 value to e.g. 30 for a 30% chance or 70 for a 70% chance.
Miczelo  [作者] 8 月 28 日 上午 10:50 
function SetActionCameraNoFallbackSync(attacker, target, disable_float, interpolation_time, no_rotate, preset_filter, dontActiveAC)
-- Randomly decide whether to trigger the action camera (e.g. 50% chance)
local should_activate_camera = AsyncRand(100) < 50 -- 50% probability
if not should_activate_camera then
return false
end

local new_pos, new_lookat, preset, fallback = CalcActionCamera(attacker, target, nil, nil, no_rotate)
if fallback then return false end
if preset_filter and table.find(preset_filter, preset.id) then return false end
assert(preset)
if not preset then return end
if not dontActiveAC then
LocalACWillStartPlaying = (LocalACWillStartPlaying or 0) + 1
end
NetSyncEvents.SetActionCameraDirect(not dontActiveAC and netUniqueId, attacker, target, new_pos, new_lookat, preset and preset.id, disable_float, interpolation_time or ac_interpolation_time, true)
return true
end
K16 8 月 20 日 下午 2:57 
interesting it can be activate as random?