Jump to content

Need help with Arma3/Ace3 script.


Recommended Posts

Hey :)

so i could need some help with a scripting problem of mine :)

So i want to spawn in a Soldier who has some ace3 damage. (maybe for a  Gamenight project ;) )

Until now i tryed it with these scripts:

 

[[myUnit, "leg_l", 0, objNull, "bullet", 0, 0.15] call ace_medical_fnc_handleDamage_advanced; 

 

or

 

[this, "body", 0, objNull, "stab", 0, 0.30] call ace_medical_fnc_handleDamage_advanced; 

 

and

 

[this] call ace_medical_fnc_handleDamage_advancedSetDamage;

 

but for some reason it doesnt work :(

 

Maybe you can see the mistake im making.

 

 

Link to comment
Share on other sites

I just had a look at the ACE medical functions. Try addAdmageToUnit.

 

/*
 * Author: PabstMirror
 * Manually Apply Damage to a unit (can cause lethal damage)
 * NOTE: because of caching, this will not have instant effects (~3 frame delay)
 *
 * Arguments:
 * 0: The Unit <OBJECT>
 * 1: Damage to Add <NUMBER>
 * 2: Selection ("head", "body", "hand_l", "hand_r", "leg_l", "leg_r") <STRING>
 * 3: Projectile Type <STRING>
 *
 * Return Value:
 * HandleDamage's return <NUMBER>
 *
 * Example:
 * [player, 0.8, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit
 * [cursorTarget, 1, "body", "stab"] call ace_medical_fnc_addDamageToUnit
 *
 * Public: Yes
 */
Link to comment
Share on other sites

This is great stuff, Bacon.  Can you say where you found it?  I ask only because it'd be great to have the full list of damage types to accompany that function ["bullet", "stab", etc...] I'm assuming Crush would be another...

 

-R

Link to comment
Share on other sites

Thanks, Bacon.

 

Zwerger, I've looked all throughout those files and haven't come across the damage types: it must be buried pretty deep somewhere.

 

Some of the code comments in the functions are great, though.  For example:

 

// If the damage is being weird, we just tell it to fuck off. Ignore: "hands", "legs", "arms"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Forum Statistics

    11.1k
    Total Topics
    66.4k
    Total Posts
×
×
  • Create New...