Jump to content
mason1996

How to make "Device" a bomb and able to disarm

Recommended Posts

hey guys, so im making a mission at the moment where we have to infiltrate a Submarine base and disarm Nukes, I wanted to use the Device Assembled set it as a bomb or doesnt even have to be a bomb but then have it be able to disarm the Nukes and then once it is disarmed it changes to the Device Disassembled. Any thoughts?

 

cheers!

Share this post


Link to post
Share on other sites

I got this, but the device disassembled - or any other object for that matter - seem to be shifting left after creation.

// Inside device assembled (name it nuke1)
this addAction ["disarm", "disarm.sqf"];

// Inside disarm.sqf
_nuke1Pos = position nuke1;
deleteVehicle nuke1;
"Land_Device_disassembled_F" createVehicle _nuke1Pos;

  • Like 1

Share this post


Link to post
Share on other sites

 

I got this, but the device disassembled - or any other object for that matter - seem to be shifting left after creation.

// Inside device assembled (name it nuke1)
this addAction ["disarm", "disarm.sqf"];

// Inside disarm.sqf
_nuke1Pos = position nuke1;
deleteVehicle nuke1;
"Land_Device_disassembled_F" createVehicle _nuke1Pos;

 

Try using setPosASL after the creation of the object, like so:

_object = "CLASSNAME" createVehicle [0, 0, 0];
_object setPosASL _position;
  • Like 1

Share this post


Link to post
Share on other sites

 

I got this, but the device disassembled - or any other object for that matter - seem to be shifting left after creation.

// Inside device assembled (name it nuke1)
this addAction ["disarm", "disarm.sqf"];

// Inside disarm.sqf
_nuke1Pos = position nuke1;
deleteVehicle nuke1;
"Land_Device_disassembled_F" createVehicle _nuke1Pos;

Ill give this a shot right now and see if it moves much cheers to the both of you

Share this post


Link to post
Share on other sites

 

I got this, but the device disassembled - or any other object for that matter - seem to be shifting left after creation.

// Inside device assembled (name it nuke1)
this addAction ["disarm", "disarm.sqf"];

// Inside disarm.sqf
_nuke1Pos = position nuke1;
deleteVehicle nuke1;
"Land_Device_disassembled_F" createVehicle _nuke1Pos;

 

Ill give this a shot right now and see if it moves much cheers to the both of you

 

 

So I tried it out and because of the map im on its fallen through the ground.

 

 

Try using setPosASL after the creation of the object, like so:

_object = "CLASSNAME" createVehicle [0, 0, 0];
_object setPosASL _position;

How would I use this in the script? like just after Deletevehicle nuke1?

Share this post


Link to post
Share on other sites

Huge thanks to zooloo75! The created disassembled device in no longer shifting to the left.

This is how the code should look:

// In assembled device's init:
this addAction ["Disarm","disarm.sqf"];

// In disarm.sqf:
_nuke1Pos = getPosASL nuke1;

deleteVehicle nuke1;

_diarmedNuke = "Land_Device_disassembled_F" createVehicle [0, 0, 0];

_diarmedNuke setPosASL _nuke1Pos;

  • Like 2

Share this post


Link to post
Share on other sites

Try this:

_nuke1Pos = position nuke1;
_nuke1Dir = getDir nuke1;
deleteVehicle nuke1;
_disarmedNuke = "Land_Device_disassembled_F" createVehicle _nuke1Pos;
_disarmedNuke setPos _nuke1Pos;
_disarmedNuke setDir _nuke1Dir;

EDIT: Oh, the one above fixed it, apparently.

Share this post


Link to post
Share on other sites

Try using setPosASL after the creation of the object, like so:

_object = "CLASSNAME" createVehicle [0, 0, 0];
_object setPosASL _position;

I would recommend to do it that way:

_obj = createVehicle ["Land_Device_disassembled_F", _nuke1Pos, [], 0, "CAN_COLLIDE"];

its faster as measured in this post and its doing the same as first creating and then doing setPosASL (because of the "CAN_COLLIDE" argument).

Edited by sarogahtyp

Share this post


Link to post
Share on other sites

 

Huge thanks to zooloo75! The created disassembled device in no longer shifting to the left.

This is how the code should look:

// In assembled device's init:
this addAction ["Disarm","disarm.sqf"];

// In disarm.sqf:
_nuke1Pos = getPosASL nuke1;

deleteVehicle nuke1;

_diarmedNuke = "Land_Device_disassembled_F" createVehicle [0, 0, 0];

_diarmedNuke setPosASL _nuke1Pos;

Cheers guys ill give this a go make sure its not shifting under the map

Share this post


Link to post
Share on other sites

 

Huge thanks to zooloo75! The created disassembled device in no longer shifting to the left.

This is how the code should look:

// In assembled device's init:
this addAction ["Disarm","disarm.sqf"];

// In disarm.sqf:
_nuke1Pos = getPosASL nuke1;

deleteVehicle nuke1;

_disarmedNuke = "Land_Device_disassembled_F" createVehicle [0, 0, 0];

_disarmedNuke setPosASL _nuke1Pos;

This worked perfectly thanks for all of the helps guys!

Share this post


Link to post
Share on other sites

This worked perfectly thanks for all of the helps guys!

 

as I said above. i recommend to substitute the last 2 lines with this one but in the above post I forgott to convert the position:

_disarmedNuke = createVehicle ["Land_Device_disassembled_F", (ASLToAGL _nuke1Pos), [], 0, "CAN_COLLIDE"];

Share this post


Link to post
Share on other sites

just letting you guys know about this cool script i just remembered reading this thread. not sure if it still works or if it works well but the idea is bad ass (watch the video). it basically uses minesweeper to do the disarming process.

 

https://forums.bistudio.com/topic/173335-shoters-disarm-script/

This is gold. Thanks for the link!

 

Cheers

  • Like 1

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

×