Jump to content
Sign in to follow this  
dr death jm

know how to add action to vehicals

Recommended Posts

Ive been looking thru alot of files trying to find how a vehical builds walls and what not,

but what i want to do is add abuild (what ever) list to a vehical that isnt auto spawn to mission,

ie; I run up to a tank factory and build a vehical (transport truck) once in in truck i get options to build like but not the same as mhq/mcu...

basicly i want to change how base defence is built at base + ammo ...

any help , i know there were options like this a long time ago but evrything now is based on cammander and mhq/mcu

thank if you can help.

Share this post


Link to post
Share on other sites

Put this in the init box of a object:

this addAction [("<t color='#99CC00'>" + ("1. TANK - Request Manufacture") + "</t>"),"createTank.sqf","",6,true,true,"","(_target distance _this) < 4"];

Create a file called createTank.sqf

TANK = "B_MBT_01_cannon_F" createVehicle (getMarkerPos "mkrTank");

Place a Marker down where you want that Tank to spawn in at, Name it: mkrTank

Share this post


Link to post
Share on other sites

thanks for the fast responce, but its not what im looking for , close but, Im looking to add action to a vehical that isnt spawn yet (built)

say for instance i go to veh factory i spawn a car, car has options to do somthing .... like a list ... build wall, build aa,...

the script you posted above is for a vehical that is placed on map. or somthing to that nature.

yes i want to spawn a vehical, but one that can build stuff... thats the add action im looking for.

I know its like adding ammo to a vehical but i wanna do it to somthing not spawn'd yet. it come out of factory like a special vehical.

Edited by Dr Death JM

Share this post


Link to post
Share on other sites

_vehicle = createvehicle [bla bla bla];

_vehicle addaction [bla bla bla];

Share this post


Link to post
Share on other sites
_vehicle = createvehicle [bla bla bla];

_vehicle addaction [bla bla bla];

this still isnt what im asking.

Share this post


Link to post
Share on other sites

IF you spawn in an object (my tank example above), try:

if (!(isNull player)) then {

fnc_MPaddAction1 = {
       _this addAction [("<t color='#006699'>" + ("MENU ACTION HERE") + "</t>"),"path\folder\example.sqf","",6,true,true,"","(_target distance _this) < 4"];};
};

and then also add:

if (isServer) then  {
TANK = "B_MBT_01_cannon_F" createVehicle (getMarkerPos "mkrTank");

sleep 1;

[TANK,"fnc_MPaddAction1",nil,true] spawn BIS_fnc_MP;
};

Edited by Goblin
forgot a };

Share this post


Link to post
Share on other sites

thanks ill test this , in a little ... working on a dm.

also i re try to explain what i wanna do in a pm ...

Edited by Dr Death JM

Share this post


Link to post
Share on other sites
IF you spawn in an object (my tank example above), try:

if (!(isNull player)) then {

fnc_MPaddAction1 = {
       _this addAction [("<t color='#006699'>" + ("MENU ACTION HERE") + "</t>"),"path\folder\example.sqf","",6,true,true,"","(_target distance _this) < 4"];};
};

and then also add:

if (isServer) then  {
TANK = "B_MBT_01_cannon_F" createVehicle (getMarkerPos "mkrTank");

sleep 1;

[TANK,"fnc_MPaddAction1",nil,true] spawn BIS_fnc_MP;
};

I tryed this, either im not understanding or it dosnt work, can you post this in a template?

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  

×