Jump to content
avibird 1

Help with Teleporting into a vehicle!

Recommended Posts

I have been fooling around with the USS FREEDOM I was wondering if I could use a  teleporting scripts with a addaction on a object next to the waterline of the carrier to teleport inside a vehicle that is already place on the carrier deck. When I just attempt to teleport to a location on the deck the unit just falls  through the carrier. 

Share this post


Link to post
Share on other sites

I use this to teleport to the USS Freedom...the one by Jigsor in this thread works great. Puts you on the  carrier in the exact same spot every time. Off the deck in case someone is taking off or landing. Dont know about being able to teleport into a vehicle though. Have a look here and see if you can use this.

 

 

 

Diesel

Share this post


Link to post
Share on other sites

@DieselJC thanks for the reply. A few questions. How do you call the teleport script when you are in the game. Is there an object next the carrier that has an addaction to teleport to the ship. I understand you put the code in a player init.sqf but I don't understand how the player who wants to use it finds the addaction menu to call it while in the game. Confused help thank you ?

Share this post


Link to post
Share on other sites

Can't you just add action "x moveincargo vehiclename?"

Share this post


Link to post
Share on other sites
17 hours ago, avibird 1 said:

@DieselJC thanks for the reply. A few questions. How do you call the teleport script when you are in the game. Is there an object next the carrier that has an addaction to teleport to the ship. I understand you put the code in a player init.sqf but I don't understand how the player who wants to use it finds the addaction menu to call it while in the game. Confused help thank you ?

I use a flag pole at base and call it "myPole"...then name the USS Freedom "Carrier" without quotes obviously..then use this as your "initPlayerLocal"

 

JIG_transfer_fnc = {
    _dest = (_this select 3) select 0;
    _dir = random 359;

    titleText ["", "BLACK OUT"];
    switch (typeName _dest) do {
        case "ARRAY" : {player setPos [(_dest select 0)-2*sin(_dir),(_dest select 1)-2*cos(_dir),_dest select 2];};
        case "OBJECT" : {player setPos [(getPosATL _dest select 0)-10*sin(_dir),(getPosATL _dest select 1)-10*cos(_dir)];};
        case "STRING" : {player setPos [(getMarkerPos _dest select 0)-10*sin(_dir),(getMarkerPos _dest select 1)-10*cos(_dir)];};
    };
    titleText ["", "BLACK IN",2];
    true
};

if (!isNil "Carrier") then {
    private _carrierPos = Carrier getRelPos [181, 349];
    myPole addAction["<t color='#F70525'>Teleport to USS_Freedom</t>", "call JIG_transfer_fnc", [[(_carrierPos select 0),(_carrierPos select 1),19.2468]], 3.5];
};
 

Then I also put an Armex sign on the deck of the carrier and name it "mySign" and add this to your init.sqf

 

_id = mySign addaction [
    "<t color=""#F70525"">" +"Teleport To BASE",
    {
        (_this select 1) setPos getPos BASE; 
        (_this select 1) moveInCargo BASE;
    },
    nil,
    1,
    false,
    true,
    "",
    "alive BASE && {speed BASE < 1}" //condition - if the BASE is alive and isn't moving. 
];

 

I use an "oilspot" on the ground at base someplace and name it "BASE" that way I can teleport to the carrier and back to base.

I'm sure there are a few ways to do this but this way is the easiest and can be used in a lot of different ways and works the best for me. The initPlayerLocal script is from Jigsor so I cant take credit for that and it works great.

 

 

Diesel

Share this post


Link to post
Share on other sites

I am going to try to set this up but to clarify my missions do not have respawns I don't have a base I just want to use this to be able to teleport onto the deck from the water's edge. 

Share this post


Link to post
Share on other sites

thank you guys this works great. I have a new question. in my mission I am using the cup LSD, the Nimitz mod and the freedom carrier. The Nimitz has its on system to get units back on board and a ladder to use. could this script be used to teleport on the LSD just like the freedom. I know I would need to change some codelines in the "initPlayerLocal.sqf  but how would I find a location to use on the deck.

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

×