madrussian Ā Ā 347 Posted May 21, 2023 I've got a pretty simple idea. I'd like to wake up dead units that are done ragdolling and send them flying on new ragdoll with each new shot. Ā Seems possible with a combination of setConscious, addForce, awake, isAwake, lifeState, incapacitatedState commands, etc. Especially reading though the notes on awake. Ā But I'm also facing some unique constraints. Basically, I likelyĀ need to keep all AI units alive (as āalive _unitā reports) all the time, including the "dead" ones. What on Earth amĀ I up to? If interested, please read on: Ā Spoiler Iāve been creating an extension-based C++/SQF hybrid AI system that uses automatically generated nav-meshes and forced movement for the AI (think playAction), which move units overĀ complex outdoor terrain and effortlessly in and out of buildingsĀ (i.e. capable path-finder) into good cover, etc. Itās undergone multiple re-rewrites, each time moving more and more from SQF to C++. With the latest iteration, I can move 100 units simultaneously at 85+ fps, so itās finally getting there performance-wise. Ā The way Iām doing all this isĀ quite bonkers (youāll see all the details upon release provided I actually get finished before A4 comes out, maybe best not to holdĀ breath), but suffice to say Iām now facing tradeoffsĀ when it comes to AI death. Ā Even without any special re-awaking of AIās ragdoll (yet), to avoid visual glitch when my moving AI units die, Iām having to treat this specially via a āHandleDamageā EH which capture the moment of his ādeathā, then ragdoll him myself via setUnconsious, and then āenableSimulation falseā, to prevent him from automatically rolling over to his backside (presumably to awaitĀ revive, which btw Iām not doing anything related to, because well respectfully Iām not personally a huge fan of revive-based gameplay, for players or AI). Ā So currently AIs ādieā (by getting shot, etc), I keep them alive and ragdoll them, then once their ragdoll settles, I ādisable simulationā on them (via āenableSimulation falseā), and then I discretely kill them āvia setDamage 1ā. And then they are actually dead. Again Iām doing this only because I have to⦠for the death from forced movement to look correct. (Btw ā This special death comes with a caveat already: His rifle never separates from his body as he ragdolls and settles, because heās technically alive during that part.) Ā My hope is now, once they are ragdolled and settled, to re-enable ragdoll on them when they are hit with bullets, explosions, etc. Because of course that would be mega-cool! Ā Unfortunately, because they died this way (using my special method), nothing Iām trying (to achieve re-ragdolling) is working. In most permutations (combinations of relevantĀ commands), when I addForce to the dead body, it (the body) ends up teleportedĀ into the ground (still moving, at a seemingly random depth). Ā My alternate idea (to achieve re-ragdolling) is to simply never let AI unit actually die (as in never use āvia setDamage 1ā and allow āalive _unitā to return true forever), and again simply āenableSimulation falseā him upon ragdoll settling, and flag him (with a variable) as "dead". Unfortunately, having big problems making this (re-ragdolling with unit always alive) work too (him teleporting still into the ground, etc). Ā Iāve spent a couple days solid on this now and Iām about to give up and just leave the dead bodies in āenableSimulation falseā state indefinitely, and give up on rag-doll re-animation (at least for now). Ā My question for you guys: Ā Has anyone created a working system of any kind that re-ragdolls a unit (dead or alive) -and- manages to also completely disable all revive-related animations?Ā And does this while remaining completely visually glitch free (like no animation snapping like with switchMove)? I know, itās a tall order. Ā Also, for those that have tried and failed (or succeeded at something similar), Iād love to hear about lessons learned, etc.Ā š Ā 2 Share this post Link to post Share on other sites
pierremgi Ā Ā 4944 Posted May 22, 2023 Perhaps a part of answer in KK's blog, here: http://killzonekid.com/arma-scripting-tutorials-forced-ragdoll/ Ā The animation states or gestures EHs could help... Not tested. Ā 1 Share this post Link to post Share on other sites
madrussian Ā Ā 347 Posted May 22, 2023 8 hours ago, pierremgi said: Perhaps a part of answer in KK's blog, here: http://killzonekid.com/arma-scripting-tutorials-forced-ragdoll/ Ā The animation states or gestures EHs could help... Not tested. Ā Nice,Ā the ole "can in the belly" trick.Ā This could indeed be part of the solution, thanks. Ā Still workingĀ to get the various transitions (moment of unit killed, live ragdoll to dead ragdoll, etc) looking smooth.Ā Struggling with "HandleDamage" EH atm, but found a couple handy links.Ā I've been using that EH for ages, but apparently not quite correctly (and in some cases, no where near correctly). Share this post Link to post Share on other sites
mikey74 Ā Ā 188 Posted May 22, 2023 This works as good as KK's scripts. bob addForce [bob vectorModelToWorld [0,0,0.7], [(random 1),(random 1),-2]]; Ā Share this post Link to post Share on other sites