Jump to content
Sign in to follow this  
Fifato

Respawn IN vehicle

Recommended Posts

Hello, I am making a mission where I need a respawn. So I learned the script and its working for me. However, its not exactly what I want.

It only can respawn somewhere, on a place that has been alerady set, or in the place where the soldier died, or squad respawn and side. You know that :)

But I need a respawn in vehicle. First of all, its probably alerady answered, but searching for it is impossible, because everything is "Respawn a vehicle" not "Respawn soldier IN vehicle", so I have to ask here. My vehicle will be something like Chinook or Black Hawk, and it will follow (actually I will pilot) us through the complete mission, to travel from objective to objective. I tried to use the helicopter instead of the marker, but that doesnt work.

Share this post


Link to post
Share on other sites

Maybe use something like this?

vehicleToRespawnInto = your_desired_vehicle;

respawnInVehicle = {
player setpos (getpos vehicleToRespawnInto);
(_this select 0) moveInCargo vehicleToRespawnInto;
};

player addEventHandler ["respawn", {_this spawn respawnInVehicle}];

Share this post


Link to post
Share on other sites

Oh nice, I didnt test it yet but the moveInCargo command is enough. I totally forgot on that one :)

Thanks alot

EDIT: Well, can you specify where I have to write this? To the initialization, description.ext or what? I probably didnt do that how you think its supposed to be, and its not working.

Edited by Fifato

Share this post


Link to post
Share on other sites
Oh nice, I didnt test it yet but the moveInCargo command is enough. I totally forgot on that one :)

Thanks alot

EDIT: Well, can you specify where I have to write this? To the initialization, description.ext or what? I probably didnt do that how you think its supposed to be, and its not working.

Name your helicopter, give it a variable, for instance: respawnhelo

In init.sqf somewhere in the client section (in case you have seperate client/server sections) you place this:

vehicleToRespawnInto = [u]respawnhelo[/u];

respawnInVehicle = {
player setpos (getpos vehicleToRespawnInto);
(_this select 0) moveInCargo vehicleToRespawnInto;
};

player addEventHandler ["respawn", {_this spawn respawnInVehicle}];

That should work afaik.

Kind regards,

Sanchez

Share this post


Link to post
Share on other sites

Thank you very much, both of you. It works exactly as I wanted :)

Share this post


Link to post
Share on other sites

can someone help? would achieve the same in a feedback mission, but that is the IA which reappear in chinoc (HELI, CJ 130, OR OTHER VEHICLE) would then ejected with a script that I have (eyect.sqf) in a trigger. single player achievement reappear but not AI. I already sick of searching the forum, I do not seek the respawn of the crew, but the west units, only to be launched again and again on the basis

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  

×