Jump to content

Recommended Posts

How can you force a ragdoll one a player for a couple seconds?

ie: Revive scripts, if you want the player to fall before they enter the "unconscious" state. :confused:

Share this post


Link to post
Share on other sites

I want to know this as well. I noticed that if I am riding in a boat at full speed and I eject into the water, it will spark a sort of unconscious state and your unit will go into a ragdoll state. I tried triggering it with player setUnconscious true both with and without 0.5 of damage but it didn't work and it doesn't matter anyway. When I used a trigger to check my lifeState, it said I was "HEALTHY" even though I couldn't move until I touched the ground for a second.

Also, there are pp effects such as tunnel vision that get triggered when holding breath for long periods of time underwater. I thought I found the script for that but now I can't find it.

Edited by Feint

Share this post


Link to post
Share on other sites

If you can somehow set up a trigger that recognizes that you have left the boat, the you can use setDamage 1, and then find a way to revive.

http://www.armaholic.com/page.php?id=18955

This might be what you're looking for, admittedly this is probably the long way of doing things, but it may work.

Share this post


Link to post
Share on other sites

Setting setDamage 1 kills the player instantly, even if I draw it back immediately with setDamage 0 right after that. And setting it to 0.99 didn't trigger anything either. I've also tried using setVelocity to move myself quickly thinking it would register some kind of stress on the player's body, but I didn't move. I am guessing that it's a separate command directly to PhysX that triggers the ragdoll state.

Share this post


Link to post
Share on other sites

It kills them yes, but that's why I pointed you to the revive script in that link, I thought maybe you could use that.

Share this post


Link to post
Share on other sites

Thanks. Yeah, I'm looking at it and can't find a way to revive over time without another player that's already alive.

Share this post


Link to post
Share on other sites

If you get hit by boat or vehicle you ragdoll for a bit, maybe you could hit the player with some kind of local invisile box.

Share this post


Link to post
Share on other sites

Killzone kid had something liek that http://killzonekid.com/arma-scripting-tutorials-forced-ragdoll/


			_rag = "Land_Can_V3_F" createVehicleLocal [0,0,0];
			_rag setMass 1e10;
			_rag attachTo [_target, [0,0,0], "Spine3"];
			_rag setVelocity [0,0,6];
			_target allowDamage false;
			_target setVelocityModelSpace [0,-2,2];
			detach _rag;
			0 = [_rag,_target] spawn {
				sleep 0.1;
				params ['_rag','_target'];
				deleteVehicle _rag;
				_target allowDamage true;
			};

I edited KK code a bit and it works with ai too.

  • Like 1

Share this post


Link to post
Share on other sites

@computer - 5 years late but thanks for sharing!:rofl:

  • Haha 1

Share this post


Link to post
Share on other sites
5 hours ago, computer said:

Killzone kid had something liek that http://killzonekid.com/arma-scripting-tutorials-forced-ragdoll/



			_rag = "Land_Can_V3_F" createVehicleLocal [0,0,0];
			_rag setMass 1e10;
			_rag attachTo [_target, [0,0,0], "Spine3"];
			_rag setVelocity [0,0,6];
			_target allowDamage false;
			_target setVelocityModelSpace [0,-2,2];
			detach _rag;
			0 = [_rag,_target] spawn {
				sleep 0.1;
				params ['_rag','_target'];
				deleteVehicle _rag;
				_target allowDamage true;
			};

I edited KK code a bit and it works with ai too.

 

 Tried this but just seems to drop the guy in place for a few seconds -any way to forcefully blow him back? Been wanting this for some old school Doom style shotguns forever now

Share this post


Link to post
Share on other sites
3 hours ago, froggyluv said:

Been wanting this for some old school Doom style shotguns forever now

Hey frogman, great minds think alike.  The mission I'm working on is shotgun oriented, and I wanted the victim blown back when hit at close range.  Here's the killed eventhandler for that. 

{
    _x addEventHandler ["Killed", 
    {
        params["_unit","_killer"];
        diag_log ["killed",_this];
       // hint format ["killed, mag %1, %2",currentMagazine _killer, _unit];
        if ( (currentMagazine _killer) find "buck" >= 0 or (currentMagazine _killer) find "Pellet" >= 0) then 
        {
            _distance = _killer distance _unit;
            _speed = 1;
            _zvel= 1;
            switch (true) do 
            { 	
                case (_distance <=18 and _distance > 12):{_speed = 5;_zvel= 1.5;}; 
                case (_distance <=12 and _distance > 7): {_speed = 7;_zvel= 2.5;}; 
                case (_distance <=7): {_speed = 11;_zvel= 3.5;}; 
              };
   //hint format ["distance=%1, speed=%2, zvel=%3",_distance,_speed,_zvel];
             _heading = [getPosATL _killer, _unit modelToWorld [0,0,3]] call BIS_fnc_vectorFromXToY; 
             _velocity = [_heading, _speed] call BIS_fnc_vectorMultiply; 
             _velocity = _velocity vectorAdd [0,0,_zvel];
             _unit setVelocity _velocity; 
             
        };
    }];
} foreach allUnits;

You may have to adjust the following line to recognize your preferred shotgun's projectile.  Replace "buck" or "pellet" with a substring that matches your shotgun's magazine name.  Obviously you could make this work for a Barret .50 caliber hit as well.

        if ( (currentMagazine _killer) find "buck" >= 0 or (currentMagazine _killer) find "Pellet" >= 0) then 

You can tweak _speed and _zvel if you want to jack up the effect.  Have fun bruddah!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Yeah pretty nice man -gonna use this for sure. Pretty much always have a bankround script running in that if I kill too many civilians -hordes of townspeople-hired shotgun crews show up to well um, chase you all over the map and shotgun you dead.

 

In honor of this bayou violence:

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, froggyluv said:

In honor of this bayou violence:

Nice.  Awesome blues song dude.  I'm a big blues fan...

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×