Jump to content
Sign in to follow this  
schadler17

Save vehicle spawn location, teleport it to a new marker.

Recommended Posts

My issue when a helicopter respawns ontop of a carrier, it blows up. No other vehicle's/objects have this issue. My solution(hopefully) is to spawn the vehicle off the carrier, save that location, and teleport it onto the carrier after it has fully spawned/initialized. My problem with this, is that if I setPos(ASL/ATL/etc) the helicopters, it saves the setPos location as its future respawn location.

 

I need help with a script that will save the initial spawn location to be called for after its blown up. Once the helicopter is dead, it should be teleported back to the initial spawn location(On land) and wait for its respawn. Once respawned, teleported back to the carrier.

 

I'm no good with scripting myself, and any attempts I have made have failed.

 

Basically, this is what I have lol.

private = ["_heli1", "_heli2", "_heli3", "_spawn1", "_spawn2", "_spawn3", "_newpos1", "_newpos2", "_newpos3"]

// Heli 1

_heli2 = "heli1";
_spawn1 = [4872.5015,339,9712.6289]; // Initial Spawn Position(On land)
_newpos1 = [3975.2178,0.28461665,102.38507]; // Where I want it to go afterwards

// Heli 2

_heli2 = "heli2";
_spawn2 = [4853.4468,339,9686.2021];
_newpos2 = [3898.4375,0.28575841,70.799438];

// Heli 3

_heli3 = "heli3";
_spawn3 = [4889.8091,339,9685.9844];
_newpos3 = [3934.7996,0.2837216,70.581543];

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  

×