Jump to content
Sign in to follow this  
Target_Practise

Spawning units and then activate script.

Recommended Posts

Hey guys, so I'm new to mission editing and I'm trying to make an a-10 CAS mission just to get my head around scripting and the editor. So far tutorials and forum browsing have given me the knowledge I need but I've hit a wall.

In this mission, my first objective is to elimiante 4 tanks. They're stationary, and don't have any scripts or waypoints. Which is fine except after I've killed the 4 tanks I want a convoy of another 4 tanks lead by a UAZ to spawn (or appear) and travel towards a city. Instead of using waypoints, I've used a 'convoy defence' script by norrin. Basically instead of the waypoints I name each unit in the convoy c1 followed by c2 then c3 etc etc, and use markers with the names pos1,pos2,pos3 etc etc and the script tells the convoy how to behave and where to go.

The script works fine except I'm not sure how to have the vehicles appear after the death of the orignial 4 tanks and then execute the script. Any help would be greatly appreciated, sorry for the long explanation.

Share this post


Link to post
Share on other sites

When spawning the first group, do

Group1 = group this;

in the group leader's init. Then in the condition of a trigger, put

{alive _x} count units Group1 == 0

and in the activation execute your next spawn script.

Share this post


Link to post
Share on other sites

So I've got the trigger happening now but I need to get each vehicle to spawn facing a particular direction (255), with a crew inside, and a name for each vehicle.

I used

_UAZ = "UAZ_INS" createVehicle (getPos Con1);

with a game logic named Con1 but there was no crew and they weren't facing the same way I put the gamelogic.

I also tried

x = [markerPos "Con1", 255, "UAZ_INS", EAST] call BIS_fnc_spawnVehicle;C1 = x select 0;

with a marker named Con1 but nothing happened.

Thanks again for the 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  

×