BIN_fnc_probeVeinHitpoint
- Runs with spawn
- Arma 3 v1.94
Function · Markdown · JSON · original wiki page
Description
Reacts to a hit on a vein of the alien probe: the vein is retracted with BIN_fnc_probeAnim (retract sound, the looping sound fades out and is deleted), and after a delay it is expanded again (expand sound, a new looping sound is created). The delay is 4 seconds by default and can be changed by setting the variable "bin_probe_retractTime" on the probe itself. The function does nothing if the hit part index is -1.
Its parameters match the Dammaged event handler, from which it is meant to be executed; no other Contact function calls it. As it uses sleep, it must run in a scheduled environment.
Note
This content is exclusive to the Arma 3 Contact Expansion.
Syntax
[probe, selection, damage, hitIndex, hitPoint] spawn BIN_fnc_probeVeinHitpoint
Parameters:
probe: Object - the alien probeselection: String - (Optional, default "") name of the damaged selection; not useddamage: Number - (Optional, default 0) resulting damage; not usedhitIndex: Number - (Optional, default -1) hit part index of the damaged hitpoint; the function exits if it is -1hitPoint: String - (Optional, default "") hitpoint name; not used
Returns: Nothing
Examples
Example 1
myProbe setVariable ["bin_probe_retractTime", 10]; // keep the vein retracted for 10 seconds
myProbe addEventHandler ["Dammaged", { _this spawn BIN_fnc_probeVeinHitpoint }];