Jump to content
Sign in to follow this  
Paladin7

Something's wrong... Can't disable legs.

Recommended Posts

Something very strange is happening on my rig. Did the Setdamage command stop disabling your legs at some point? I'm making a script, and a big part of it is setting the damage to a level where you can only crawl, but for some reason even if I setdamage to 0.9, I can still walk...

Did the command change in 1.09? Or is there something strange going on on my machine?

Share this post


Link to post
Share on other sites

I've noticed the same thing m8. Setdamage currently reduces the health and adds the blood textures to the unit but it does not affect its ability to move unfortunately.

Share this post


Link to post
Share on other sites

Well, I'm glad it's not something that's wrong on my machine then.

How can you force players to go prone then? Tried setunitpos "down", but I guess it only works for AI.

Share this post


Link to post
Share on other sites

Now that I think about it, if there's no other way, I suppose you could play the going prone animation, and then check if he tries to go to kneeling or standing, and if so, pay the prone animation again.

I'm not very good with animations though.

Is there another way? An easier way? If so, what?

And if not, think someone could give me a hand with the animation idea?

Share this post


Link to post
Share on other sites
Well, I'm glad it's not something that's wrong on my machine then.

How can you force players to go prone then?    Tried setunitpos "down", but I guess it only works for AI.

Hulking Unicorn wrote a little script (rPrn.sqf) for the revive scripts that forces a player to stay down when he is damaged using the setdamage command that might help.  The latest revive is available here:   http://home.iprimus.com.au/simonnsl/norrinsArmA/AI_disabled_x_1.45.zip

Extract the file and you'll find rPrn.sqf in the revive_sqf sub folder.

Share this post


Link to post
Share on other sites

Yes the setDamage behaviour is a bit weird.

You could have a vehicle with damage=0.7 and all tyres damaged. Then using setDamage to 0.8 will repair all tyres and body, making it fully drivable.

However, with a tank, it appears to damage all parts equally in damage HUD but not the actual tank.

It makes simulating tyre repairs impracticle. It would be nice to have access to the damage sub-system (used by addEventHandler 'Dammaged' ).

Share this post


Link to post
Share on other sites

You can wait until (or force) a unit to be in a known animation, then create a bullet, give it some velocity, and put it in his legs.

For example, try this when the player while in the generic standing still animation (name???). It also works when used in the init line:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

tempBullet = "B_556x45_SD" createVehicle [0,0,10];

tempBullet setVelocity [0,0,-600];

tempBullet setpos (player modelToWorld [-0.1,0.2,0.2])

Of course the player will hear the bullet and see the damage icon. You could hide this with an scripted intro or something...

Share this post


Link to post
Share on other sites

I would use setvelocity on the player and throw him into the ground so he breaks his legs.

Share this post


Link to post
Share on other sites

haha, sorry, but the last two posts on here made me crack up smile_o.gif

Brilliant ideas, though wink_o.gif

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
Sign in to follow this  

×