Jump to content
Sign in to follow this  
fasterthanlight

Teleport issue KheSanh/Nimitz

Recommended Posts

I need to make it possible to teleport from one deck height to another by using flags as teleports. I have no problem with the init in the flags but I have an issue with the teleport.sqf.

Here is what I have originally that allows you to teleport to the Nimitz deck from a land area where ONLY the Nimitz is on the map.

// Get the destination.

_dest = (_this select 3) select 0;

// Get a random direction

_dir = random 359;

if(_dest == USS_Nimitz) then

{

player setPosasl [(getPosASL _dest select 0), (getPosASL _dest select 1) +1, (getPosASL _dest select 2)];

}

else

{

player SetPos [(getPos _dest select 0)-10*sin(_dir),(getPos _dest select 1)-10*cos(_dir)];

};

Here is what for teleport to the Nimitz AND KheSanh as separate destinations.

The soldier lands in the water each time.

// Get a random direction

_dir = random 359;

switch (_dest == USS_NIMITZ) do

{

case true:

{

player setPosasl [(getPosASL _dest select 0), (getPosASL _dest select 1) +1, (getPosASL _dest select 2)+20];

player SetPos [(getPos _dest select 0)-10*sin(_dir),(getPos _dest select 1)-10*cos(_dir)];

};

case false:

{

player setPosasl [(getPosASL _dest select 0), (getPosASL _dest select 1) +1, (getPosASL _dest select 2)+20];

player SetPos [(getPos _dest select 0)-10*sin(_dir),(getPos _dest select 1)-10*cos(_dir)];

};

};

Can I get a little help with the teleport from ship deck to ship deck?

Share this post


Link to post
Share on other sites

Hey getting things on the deck is hard alone just using the editor. At times it works fine and the next time the unit/objects falls between the decks. The ships are not a whole object it is many parts put together I think this will be very hard to get to work right all the time. Good luck. Avibird.

Share this post


Link to post
Share on other sites

Duly noted.

A friend and I have been working on this and we have tweaked it a little here and a little there.

Even after we added the +20 at the end, the soldier still appears in the hull and falls to the water.

There's gotta be a way. :)

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  

×