Jump to content
Sign in to follow this  
Morts

Add damage to player

Recommended Posts

Hi guys, basically I want to know if there's a way to give the player damage, enough to fall to the floor and must be healed, I've tried setdamage, but it doesn't work. Apparently only setdamage 1 works, and I don't want them to die.

Any help is appreciated.

Cheers, Morts

Share this post


Link to post
Share on other sites

No, why the specifics? I've only done 0.8, 0.9 and 0.1, i'll give that a crack

Okay, tried it and to no avail, starting to think sarcasm was coming through -.- :P.

Edited by Morts

Share this post


Link to post
Share on other sites

I think what you need is the first aid module.

Share this post


Link to post
Share on other sites
I think what you need is the first aid module.

I tried it with the first aid modules mate.

I'll give the legs thing a go now.

EDIT: Just tried doing the legs, and it gives the damage to the legs brilliantly, however there is no option to heal it, is there a way to add blood to the equation, I presume that because the legs are damaged it adds the option to be dragged, I'm only testing this on my own at the moment. Essentially i'd like this to be ACE compatible, i've tried even using just animations to simulate being injured, and whilst it does simulate it, it again, does not give the option to be healed.

Edited by Morts
Tested

Share this post


Link to post
Share on other sites

Not sure about the blood effect, but to be able to heal/revive you would need one of the many revive scripts made by the community or use the First Aid modules in the map editor.

Share this post


Link to post
Share on other sites

sethit on legs cause damage to the legs, but is not registred in the overall damage.

so a unit with sethit 1 to the legs cannot walk, but a damage check reveals he has 0 damage.

work around this by adding damage.

setHit only works on parts, setDammage works on overall status.

this will injure the player and make him unable to walk, and medics can heal him.

player setDammage 0.89; player setHit ["legs", 1];

here is link to wiki for sethit.

in there you can use search to look up info on any command. also there is a complete list of all commands here:

you should bookmark this page and always look at least there for answers.

Edit: i took a look at my mission, i used setdammage first then sethit after for the wounded and unable to walk unit.

above code corrected in order.

Edited by Demonized
reversed order of sethit and setDammage

Share this post


Link to post
Share on other sites

The player setdamage seems to cancel out the leg hit

Share this post


Link to post
Share on other sites

not sure if this is what you are trying to do but i done something similar like this

Trigger / Radio Alpha

OnAct : s1 setdammage 0.899

Unit name s1 also added in the medical modules and when you Radio Alpha he will roll around on the floor and you can then move up to heal him..

Not sure about it being ACE compatable tho

Share this post


Link to post
Share on other sites

If you're using ACE you cannot use setDamage for players. You must add damage this way:

[unit, 0.8] call ace_sys_wounds_fnc_addDamage;

This will default to normal setDamage usage if the Wounding module isn't present.

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  

×