Jump to content
Sign in to follow this  
bobrock011

Spawn a playable vehicle

Recommended Posts

I would like to spawn a playable Mi8 helicopter in my mission, where I can switch

to pilot or gunner position. I managed to spawn the heli, but it's controlled

by AI. Whats the init line for having a playable crew? Thanks.

Share this post


Link to post
Share on other sites

How did you spawn a manned vehicle? I thought it is only possible to spawn empty vehicles... :confused:

Share this post


Link to post
Share on other sites

Are you creating this vehicle using scripts or the in-built editor?

If you're using the editor, in the helicopter's "Insert Unit" dialogue, there's a drop-down box labelled 'Control'. If you set this to "Playable as Pilot, Gunner", the crew of the helicopter can then be manned by players instead of AI.

I'm not sure if playable slots can be added using scripts though. Don't take my word for it - just an (slightly) educated guess.

Share this post


Link to post
Share on other sites

@buliwyf

I used this code in my trigger:

ac = [markerPos "ship", random 360, "Mi24_p", EAST] call BIS_fnc_spawnVehicle; ac doMove getMarkerPos "airport";

"ac" is the name of my heli. It works fine, it spawns and fly to the correct marker but I want to be able to control it as a pilot/gunner, and then delete it once I'm done with it.

@ fuzzy bandit

I guess the code I used counts as a script by BIS.

Share this post


Link to post
Share on other sites

What is the exact set-up you're looking for? Do you want to spawn an empty vehicle? Or a vehicle with AI gunners? How will you get into the vehicle? Run up and get in? Move straight in when it spawns?

Share this post


Link to post
Share on other sites

I would like to spawn a flying Mi24 with the pilot/gunner crew by a trigger (already done) and be able to team switch to gunner or pilot so I can fly it myself for a while (not able to do). After I'm done with the enemy targets, I would like to switch back to playing as one of my infantry men and delete the Mi24.

The reason I am doing this is because I am making a mission that features invading the Island from the sea. So, I do not want an option of starting the unit on the ground. Also, it would be neat to be able to spawn various playable units and delete them afterwards so I can save resources.

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  

×