Jump to content
Sign in to follow this  
dm610

Script to make a more battlefield style mission

Recommended Posts

Hey im somewhat new to scripting and i have been working on a battlefield style mission (i.e. two sides, around 64 units spawn repeatedly as one side tries to cap the other sides base or bring ticket count to zero). I am running into trouble when trying to get a group to spawn, enter a vehicle, have the vehicle transport the group to a certain location and then unload the group that will then move to attack the base whilst the vehicle whether a helicopter or. Normally on the mission editor this is easy to do. However i do not know how to have this happen repeatedly so that if the vehicle is destroyed or the group is wiped out both respawn and repeat the same task. If someone knows ho to do this please help.

dm610

Edited by dm610

Share this post


Link to post
Share on other sites

ok now ive gotten a vehicle to respawn and move to a set waypoint (thx to norrins veh ai respawn script). However though the vehicle respawns and moves to a waypoint it does not wait long enough for the rest of the group to get in cargo instead the vehicle drives to the waypoint with the rest of the group in pursuit. Any advice would be welcome

dm610

Share this post


Link to post
Share on other sites

Use moveInCargo to get your guys into the vehicle faster/from the start?

Share this post


Link to post
Share on other sites

I tried that and in the begging all the units are in the vehicle howver when it is destroyed and it respawns only the driver spawns in the vehicle while everyone else in a cargo position is outside the vehicle and they do not attempt to get in it. To make this more simple does anyone know how to have an empty vehicle for ex a humvee and have a group of 4 soldiers board the vehicle move to a set waypoint and if killed, respawn and re board the vehicle and move to that same waypoint, and repeat the process over and over.

Share this post


Link to post
Share on other sites

What you'll want to do is instead of placing units, having them do stuff, then trying to replicate those movements you'd want to copy the waypoint so you have the same waypoints every time, then spawn things so you have the same units every time then have them do the waypoints. So you're always spawning the same thing, even the first time.

Share this post


Link to post
Share on other sites

Ok so now i have an empty humvee that spawns when destroyed using nul = [this, 100, 5, "WS1"] execVM "AIvcl_respawn_WP\AIvcl_respawn_WP_init.sqf"; , and i have a group of 4 soldiers who board the vehicle with s1 assignAsDriver a1; [s1] orderGetIn true;(driver,and cargo). And the soldiers respawn with nul = [this, 100, 10, "west_spawn"] execVM "AI_respawn\AI_respawn_init.sqf";. However the soldiers upon spawning do not board the vehicle, i just need to find a way for the soldiers to follow the "ordergetin" script everytime they respawn and then hopefully if they can follow a waypoint on top of that everything will work out fine. Someone please tell me this is possible.

---------- Post added at 15:47 ---------- Previous post was at 15:35 ----------

What you'll want to do is instead of placing units, having them do stuff, then trying to replicate those movements you'd want to copy the waypoint so you have the same waypoints every time, then spawn things so you have the same units every time then have them do the waypoints. So you're always spawning the same thing, even the first time.

Thank you for the reply,

What your saying seems to make more sense but with my lack of experience i really do not know how to have the units spawn so that each time the unit and humvee spawn they do the same actions, follow the same waypoint repeatedly until one team is victorious. Is there some guide to this?

Share this post


Link to post
Share on other sites

The difference would be instead of using that AI respawn thing, you'd just check when the s1 group is all dead and repeat it's spawning process again. So basically creating your own respawn.

Share this post


Link to post
Share on other sites
The difference would be instead of using that AI respawn thing, you'd just check when the s1 group is all dead and repeat it's spawning process again. So basically creating your own respawn.

would you be able to show me how thats done? ive basically been scripting for about 3 days now so theres a lot i dont know.

Share this post


Link to post
Share on other sites
Here's an example of that kind of thing.

thanks for the link ive been trying to take it apart and make the script fit my goal and so far it seems to be working a bit tedious but its woth it. thx 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  

×