Simple Feign Death
From CryWiki
Simple Feign Death
Lua Sample Walkthrough
You can add this code in any lua file. If you don't know which one, use scripts/main.lua
System.AddCCommand("feigndeath","ToggleFeignDeath()","Feign Death"); function ToggleFeignDeath() -- Check if the global feigndeath var is available -- If it's not: we need need to activate feign death if feigndeath == nil or feigndeath == false then feigndeath = true; -- Activate ragdoll g_localActor.actor:SetPhysicalizationProfile("ragdoll"); -- We need to set this or else the AI will still shoot you. System.SetCVar("ai_IgnorePlayer",1); -- Revive the player again. else feigndeath = false; g_localActor.actor:Revive() System.SetCVar("ai_IgnorePlayer",0); end end
Now you can type in 'feigndeath' in the console and the script will execute.
You can also bind this command to a key: type 'bind <key> feigndeath' in the console.
