Arma 3
Mania Apr 2, 2021 @ 8:53pm
How can you make a Suicide Drone?
I'm trying to make the NATO UCAV (Not the sentinel the other one) into a suicide drone cus of it's striking similarities to the Israeli IAI Harop.

To be more specific, I want a GBU to detonate when the drone reaches 0 health.
Originally posted by Shillelagh:
Alright here is the .sqf code.
It's very simple, only four lines

_me = _this select 0; //Get our first argument waitUntil {(damage _me) > 0.1}; //Wait until the drone is hurt. You can tweak the threshold bomb = "Bo_GBU12_LGB" createVehicle (_me modelToWorld [0,0,-0.5]); //Spawn a bomb bomb setDamage 1; //Bombs instantly explode when destroyed, so do that.

Put this code into a file called
suicideBomb.sqf
in your mission folder and to use it just put
[this] execVM "suicideBomb.sqf"
in the Init of the vehicle you want to become a bomb. You can always swap the class names out in that second line to tweak explosion size.

Cheers!
< >
Showing 1-7 of 7 comments
Shillelagh Jul 3, 2021 @ 12:52pm 
Give about 30 minutes to get home and I can give you a .sqf version and a trigger version, whichever is easier for you.
Mania Jul 3, 2021 @ 1:16pm 
Originally posted by Shillelagh:
Give about 30 minutes to get home and I can give you a .sqf version and a trigger version, whichever is easier for you.
Shouldn't be anything too hard right? Should just be a script to spawn a GBU-12 when drone (with a variable name) reaches 0 health
Shillelagh Jul 3, 2021 @ 1:19pm 
Originally posted by ToXiC bAnDiT mAiN:
Originally posted by Shillelagh:
Give about 30 minutes to get home and I can give you a .sqf version and a trigger version, whichever is easier for you.
Shouldn't be anything too hard right? Should just be a script to spawn a GBU-12 when drone (with a variable name) reaches 0 health
Yep! If you have the code knowledge and are stuck on something I'm happy to help.
Mania Jul 3, 2021 @ 1:47pm 
Originally posted by Shillelagh:
Originally posted by ToXiC bAnDiT mAiN:
Shouldn't be anything too hard right? Should just be a script to spawn a GBU-12 when drone (with a variable name) reaches 0 health
Yep! If you have the code knowledge and are stuck on something I'm happy to help.
Thank you, add me on steam and send me the script or .sqf when you have it.
The author of this thread has indicated that this post answers the original topic.
Shillelagh Jul 3, 2021 @ 1:47pm 
Alright here is the .sqf code.
It's very simple, only four lines

_me = _this select 0; //Get our first argument waitUntil {(damage _me) > 0.1}; //Wait until the drone is hurt. You can tweak the threshold bomb = "Bo_GBU12_LGB" createVehicle (_me modelToWorld [0,0,-0.5]); //Spawn a bomb bomb setDamage 1; //Bombs instantly explode when destroyed, so do that.

Put this code into a file called
suicideBomb.sqf
in your mission folder and to use it just put
[this] execVM "suicideBomb.sqf"
in the Init of the vehicle you want to become a bomb. You can always swap the class names out in that second line to tweak explosion size.

Cheers!
Mania Jul 3, 2021 @ 1:49pm 
Originally posted by Shillelagh:
Alright here is the .sqf code.
It's very simple, only four lines

_me = _this select 0; //Get our first argument waitUntil {(damage _me) > 0.1}; //Wait until the drone is hurt. You can tweak the threshold bomb = "Bo_GBU12_LGB" createVehicle (_me modelToWorld [0,0,-0.5]); //Spawn a bomb bomb setDamage 1; //Bombs instantly explode when destroyed, so do that.

Put this code into a file called
suicideBomb.sqf
in your mission folder and to use it just put
[this] execVM "suicideBomb.sqf"
in the Init of the vehicle you want to become a bomb. You can always swap the class names out in that second line to tweak explosion size.

Cheers!
Perfect thank you
Shillelagh Jul 3, 2021 @ 1:52pm 
Originally posted by ToXiC bAnDiT mAiN:
Originally posted by Shillelagh:
Alright here is the .sqf code.
It's very simple, only four lines

_me = _this select 0; //Get our first argument waitUntil {(damage _me) > 0.1}; //Wait until the drone is hurt. You can tweak the threshold bomb = "Bo_GBU12_LGB" createVehicle (_me modelToWorld [0,0,-0.5]); //Spawn a bomb bomb setDamage 1; //Bombs instantly explode when destroyed, so do that.

Put this code into a file called
suicideBomb.sqf
in your mission folder and to use it just put
[this] execVM "suicideBomb.sqf"
in the Init of the vehicle you want to become a bomb. You can always swap the class names out in that second line to tweak explosion size.

Cheers!
Perfect thank you
:steamthumbsup:
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Apr 2, 2021 @ 8:53pm
Posts: 7