Jump to content

Recommended Posts

Hello , for a mission i'd like to charge the submarine SDV on a truck like HEMTT transport truck the open version . Then move whit it to a beach and upload it . The perfect thing it's also to see him on the truck , if you undrestand what i hope ?

Thanks a lot for reading this . And other thanks for the persons who give me the solution ...

Edited by piedebeouf

Share this post


Link to post
Share on other sites
sub attachTo [car, [0,-1.5,1.5]]; sub animate ["periscope", 3]; sub animate ["Antenna", 3]; this animate ["HideScope", 3]; sub animate["display_on_R", 1];

Edited by kylania

Share this post


Link to post
Share on other sites

Thanks for this ! And can i ask you how to load SDV and also to move away with it in truc and unload it ? on a driver menu ?

Share this post


Link to post
Share on other sites

That's a muuuuch more complex process than just making it look good in the back of the truck. :) I had some code for it, but lost it. I'll try to see if I can find it again.

Share this post


Link to post
Share on other sites

Thanks a lot, i try your command on un radio trigger , perfect .

i have some trouble with the detach it's work , but the submarine stay in the truck . i try this but it doesn't work : detach sdv1; sdv1 SetPos [getPos sdv1 select -5, getPos sdv1 select 0, 0]

I have a message division by zero ??

and if i enter positive number , the submarine disappear ....

Share this post


Link to post
Share on other sites

This code in a Radio Trigger would release the sub and "drop" it 10 meters behind the truck.

detach sub;  sub setPosATL (car modelToWorld [0,-10,0]);

---------- Post added at 04:28 AM ---------- Previous post was at 04:02 AM ----------

Here's the full system. Name your HEMTT "car" and your SDV "sub". Paste this into the init if your car:

this addAction [
"Load SDV",
{
sub attachTo [car, [0,-1.5,1.5]]; 
sub animate ["periscope", 3]; 
sub animate ["Antenna", 3]; 
sub animate ["HideScope", 3]; 
sub animate["display_on_R", 1]; 
sub setVariable["attached", true, true];
},[],1,false,true,"",
"(!isEngineOn car) && (driver _target == _this) && (sub distance car < 20) && !(sub getVariable 'attached')"
]; 

this addAction [
"Unload SDV",
{
detach sub; 
       sleep 1;
sub setPosATL [1,1,100];
sub setPosATL (car modelToWorld [0,-15,0]);
sub setVariable ["attached", false, true];
},[],1,false,true,"",
"(!isEngineOn car) && (driver _target == _this) && (sub getVariable 'attached')"
];

and this into the init of your sub:

if (isNil {sub getVariable "attached"}) then {sub setVariable["attached", false, true];};

Then just drive the car up to within 20m of the sub, turn the engine off and the driver can load the sub. Drive wherever you want it and turn the engine off then the driver can drop it 15m behind the car.

Edited by kylania

Share this post


Link to post
Share on other sites

perfect , simple , effaces ! Thanks a lot . this is exactly what I looking for thanks a lot

Share this post


Link to post
Share on other sites

Nice script Kylania very handy, this works great, however if you reload the SDV from the sea and off load, get back in it again you are given the view of being under the sea again lol, no biggie just thought I would let you know. :)

Share this post


Link to post
Share on other sites

Kylania would it be possible to use this convert it to load other types of objects like ammo, containers, and supplies etc ?

Share this post


Link to post
Share on other sites

You'd probably want a more robust program like BTC's Logistics system. This was basically just a quick and dirty demo. :)

The main problem is there's no easy "center in cargo" value for different sized items. Took me about 15 tries to get the sub to look decent in the back and on the ground. So you could certainly have this kind of thing support different items but it's gonna be a lot of debug consoling and ESC'ing to get the right values for whatever items you wanted to support.

Share this post


Link to post
Share on other sites

Ok thanks for the reply I will have a go at it, thought i'll probably end up with it on the cab hahahahaa

Share this post


Link to post
Share on other sites

Kylania, how do you use these get/set variables so I could make it that the SDV's are instantly loaded onto the trucks when the mission starts, and do not have the load option but an unload option instead, but then after you unload them it works as normal?

Share this post


Link to post
Share on other sites

replace the sub's init field with:

null = [] spawn { sub attachTo [car, [0,-1.5,1.5]];    sub animate ["periscope", 3];    sub animate ["Antenna", 3];    sub animate ["HideScope", 3];    sub animate["display_on_R", 1];    sub setVariable["attached", true, true];};

Share this post


Link to post
Share on other sites
Who knows what works on a dedicated server or not? :)

heh, well I'm guessing it will, don't see why it wouldn't. I'll obviously test it anyways.

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  

×