Jump to content
Kaede Takagaki

CUP LHD Rear Gate Opening Scripts?

Recommended Posts

Hi all

 

May I ask for a script able to open the rear gate of CUP LHD in editor ?

 

I tried seek class name in config viewer however the LHD has no animateSource and UserActions ... 

 

Now I am confusing how to work it out , any ideas?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Try this:

 //Open:
this animate ["door_welldeck", 1];
this animate ["door_welldeck_2", 1];
this animate ["door_welldeck_3", 1];

//Close
this animate ["door_welldeck",0];
this animate ["door_welldeck_2",0];
this animate ["door_welldeck_3",0];

//and also I don't know what is this
this animationPhase "door_welldeck" < 0.5; 
this animationPhase "door_welldeck" >= 0.5;

I just looked a little bit into the config.cpp

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for help, however sadly it’s not work to me....

From the class name  , seems they made LHD into different parts and finally combined all these parts together and it cause us can’t select the right part which welldeck locating so our scripts not work (I guess)

 

I also tried Something like :

player action [“Open_Well_Deck“,player];

it still not working, but I think I might work if we know the correct action classname.

Share this post


Link to post
Share on other sites

After trying a little bit more, I got it working using a nearest objects (I looked into the lhd functions and all used this)

_Vehs = nearestobjects [lhd,[],100]; 
{
	_x animate ["door_welldeck",1];
	_x animate ["door_welldeck_2",1];
	_x animate ["door_welldeck_3",1];
} forEach _Vehs;

Now, you could situate an object close to the end of the ship, or use coordinates and lower the radius of the nearestobjects.

Share this post


Link to post
Share on other sites
On 5/26/2020 at 4:10 AM, Erwin23p said:

After trying a little bit more, I got it working using a nearest objects (I looked into the lhd functions and all used this)


_Vehs = nearestobjects [lhd,[],100]; 
{
	_x animate ["door_welldeck",1];
	_x animate ["door_welldeck_2",1];
	_x animate ["door_welldeck_3",1];
} forEach _Vehs;

Now, you could situate an object close to the end of the ship, or use coordinates and lower the radius of the nearestobjects.

Thank you so much! It finally worked after few changes:)

 

I don’t know why it wasn’t work if directly copy your script format , if insets it into an object will shown error “init: “.

 

I made few little changes and let it into this :

 

_Vehs = nearestObjects [lhd,[],100];
{ _x animate ["door_welldeck",1];_x animate ["door_welldeck_2",1];_x animate ["door_welldeck_3",1]; } 
forEach _Vehs;

 

and then It worked well.The changes are only change “nearestobjects” into “nearestObjects” and then put all _X animate stay closer with brackets .

 

You help me solved a really large problem, I am really appreciate, thanks again.

 

  • Like 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

×