Jump to content
Sign in to follow this  
zdowggg

make ai vehicle respawn

Recommended Posts

if i want to place and ai vehicle in the editor and make it respawn how do i do that

Edited by zdowggg

Share this post


Link to post
Share on other sites
if i want to place and ai vehicle in the editor and make it respawn how do i do that

ur prolly gonna want to use event handlers.

i tried to do it for you but it only respawns once. maybe someone will clean this code up and fix it for you so vehicles always respawn.

vehicles Init field in the editor:

null = [this] execVM "VehicleRespawn.sqf"; 

VehicleRespawn.sqf


_car = _this select 0;

VehicleSpawner = "yourmarker"; //vehicle spawn marker

VehicleKilled = CompileFinal preprocessFileLineNumbers "VRespawn.sqf";
_car addEventHandler ["killed", {[_this select 0] Spawn VehicleKilled}]; 

VRespawn.sqf

ExecVM "VehicleRespawn.sqf";

_car = [markerPos VehicleSpawner, WEST, ["B_MRAP_01_hmg_F"], [], [], [0.25, 0.25]] call BIS_fnc_spawnGroup; 

Share this post


Link to post
Share on other sites

Place down the vehicle. Place down the Vehicle Respawn Module. Synch the two. Enjoy.

Share this post


Link to post
Share on other sites

You can also apply Tophe's Simple Vehicle Respawn script with the proper edits. It's what I do for my gunnery range map =)

Share this post


Link to post
Share on other sites

kylania i tryied that but if its an ai vehicle it dont work. only an empty one unless im doing something wrong

Edited by zdowggg

Share this post


Link to post
Share on other sites

the one you posted in the other thred is spawing ai with code and i dont know any other code exspt the one u gave me wich is why i want to know how to make a blue for ai vehicle that i put on my editor respawn with out haveing to use code to make the unit its self

so basicly i want to place a blue for hunter and then when it does i want that hunter to respawn at the marker or ware ever i have set but i want it to be a unit ive placed in the editor my self that way i dont need to figure out new code every time i want to place a new vehicle for them to spawn in

---------- Post added at 04:01 AM ---------- Previous post was at 03:58 AM ----------

if theres no other way i need to know all the code for the op for and blue for vehicles so i can change it up

---------- Post added at 04:07 AM ---------- Previous post was at 04:01 AM ----------

sry im new to this and alot of the stuff you guys say is really confusing not trying to be annoying sry if i am tho dont mean to just trying to get the grasp of it

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  

×