Jump to content
Sign in to follow this  
NGagedFX

Mobile Spawns

Recommended Posts

This is what I'm trying to create:

Team starts off with 2 HMMWVs (HMMWV_1 and HMMWV_2).

When you die, you should respawn at the closest HMMWV (so if there's one you're not using, you won't respawn back at base).

This should only work as long as the HMMWV is alive, so if both are destroyed, respawns will be disabled.

I started off by trying to create a respawn marker at the HMMMVs location, but even this is not even working...

spawn_1.sqf

hint "start";
respawn_West_1 = createmarker ["respawn_West_1",getpos HMMWV_1];
respawn_West_1 setmarkershape "ELLIPSE";
respawn_West_1 setmarkersize [4,4];
respawn_West_1 setMarkerColor "ColorGreen";
hint "end";

It does display the "end"-hint, but that's about it. No marker, no respawn. Though, if I could get that to work, I would continue like this:

while (Alive HMMWV_1) do
{
respawn_West_1 setMarkerPos getPos HMMWV_1;
sleep 1;
};
deleteMarker respawn_West_1;

This way I think the marker/spawn area would be positioned at the HMMWV_1's position. Does anyone know what's going wrong and how to spawn someone at the closest marker (respawn_West_1 or respawn_West_2)?

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  

×