Jump to content
Sign in to follow this  
aaronhance

How can I attach a script to a vehicle?

Recommended Posts

Hey, I was wondering how I would I be able to attach a script to a vehicle that was put in the mission via createVehicle.

Share this post


Link to post
Share on other sites

in your script you will hopefully have referred to the vehicle as something easy to remember like _vcl or _veh.

Just use

 _veh execvm "Scriptname.sqf";

after the createvehicle line of code.

you might instead have to use

[_veh] execvm "scriptname.sqf";

it all depends on how the script is set up to be able to accept the vehicle - it may also need other inputs.

Share this post


Link to post
Share on other sites
in your script you will hopefully have referred to the vehicle as something easy to remember like _vcl or _veh.

Just use

 _veh execvm "Scriptname.sqf";

after the createvehicle line of code.

you might instead have to use

[_veh] execvm "scriptname.sqf";

it all depends on how the script is set up to be able to accept the vehicle - it may also need other inputs.

Thanks for your help.

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  

×