Jump to content
Sign in to follow this  
Black²

Ramp lowering if Waypoint has been reached

Recommended Posts

So im trying to create this mission where a RAF chinook (epic addon, thanks) lands ontop of some water and you park a boat in the back (still WIP but still.)

I want him to lower his Ramp when a certain waypoint has been reached, how do i do this?

(NEEDS TO BE A CODE I CAN PUT IN THE WAYPOINT onAct!!!)

no weird scripts please.. im trying to keep this simple.

Share this post


Link to post
Share on other sites

You probably need to figure out what "action" command the creator set ramp lowering to be, so you can use "chinook action ["lowerRamp", chinook]"... assuming it's called lowerRamp but I have no idea :). That's an easy syntax to use for it, though.

PS. Sounds like an awesome idea! Hope you get it working.

Share this post


Link to post
Share on other sites

Did you ever get this working? I haven't forgot about it!

Share this post


Link to post
Share on other sites

Your main problem is the "land on some water". The AI chopper is smart enough to know it can't land in water and therefore will try to land as close as it can to your water spot on dry land.

The actual opening of the ramp is trivial. :) Just put a MOVE waypoint before your landing waypoint with CH1 animate["Ani_Ramp",1]; as the activation. Assuming your Chinook is called "CH1".

Edited by kylania

Share this post


Link to post
Share on other sites

How do you know that's the animation name kylania?

Share this post


Link to post
Share on other sites

I checked the Config.cpp from the addon. :)

	class AnimationSources
	{
		class Ani_Ramp
		{
			source = "user";
			animPeriod = 2;
			initPhase = 0;
		};
	};
	class UserActions
	{
		class LAOpenRear
		{
			displayName = "Lower Ramp";
			position = "pos pilot";
			radius = 10;
			condition = "(this animationPhase ""Ani_Ramp"" < 0.5)&& (alive this)";
			statement = "this animate[""Ani_Ramp"",1]";
			onlyforplayer = 1;
			priority = 4.700000;
			showWindow = 1;
		};
		class CloseRear
		{
			displayName = "Raise Ramp";
			position = "pos pilot";
			radius = 10;
			condition = "(this animationPhase ""Ani_Ramp"" > 0.5)&& (alive this)";
			statement = "this animate[""Ani_Ramp"",0]";
			onlyforplayer = 1;
			priority = 4.700000;
			showWindow = 1;
		};
	};

Share this post


Link to post
Share on other sites

That sounds like a good idea. Ive tried hovering it in water and it dose sit there nicely if it’s at the right height.

But i doubt you will be able to take of with the boat in the belly, if its not attached using the attach command. Might have to give this a shot myself though :)

And yea the ramp is Ani_Ramp

Edited by konyo

Share this post


Link to post
Share on other sites

ah cool... i dont usually unPBO stuff :P

Share this post


Link to post
Share on other sites
ah cool... i dont usually unPBO stuff :P

Yeah some pretty weird stuff if you don’t know what ur doing lol

Share this post


Link to post
Share on other sites

Would it be possible to simulate landing on water by telling him to fly in height 0.5? Would there be any way to make him stop at the waypoint rather than him keeping flying through it at full speed?

Share this post


Link to post
Share on other sites

Okay so I obsessed over how cool the idea of this was for a bit just now and just HAD to do it lol. I'll put a video of it up soon :)

---------- Post added at 09:20 PM ---------- Previous post was at 08:37 PM ----------

Check it out! Epic awesome sauce!!!

http://www.vimeo.com/5852344

Later on I wanna add an action that lets you pull the CRRC back out of it after the chinook has landed :)

Share this post


Link to post
Share on other sites
Would it be possible to simulate landing on water by telling him to fly in height 0.5? Would there be any way to make him stop at the waypoint rather than him keeping flying through it at full speed?

Could you not try putting an unload waypoint so he stops?

Okay so I obsessed over how cool the idea of this was for a bit just now and just HAD to do it lol. I'll put a video of it up soon

:)

Looking forward to seeing that video too, i Haven’t yet tryed it.

Edited by konyo

Share this post


Link to post
Share on other sites

Konyo in case you didn't realize lol... the link to the video was in the same post :P

Share this post


Link to post
Share on other sites
Konyo in case you didn't realize lol... the link to the video was in the same post :P

:laugh: Opps, i didnt see the edited box.

Thats a sweet video. Did you use the attach command though? Or just park it in the back?

Also how did you get the Chinook to hover 0.5 above ground?

Edited by konyo

Share this post


Link to post
Share on other sites

Try and see if you can figure out a way to do it. If it stumps you I'll tell you. I'd like to see what other ways people come up with, though.

Share this post


Link to post
Share on other sites

Its probs some code in the box. So i dont have a clue lol

Share this post


Link to post
Share on other sites

My original idea was to place an invisible helipad in the water and setPos it just to Sea Level. I didn't try it just over sea level though. Gonna try some other things after lunch though. :)

Share this post


Link to post
Share on other sites

JDog, excellent work and an excellent reenactment of that youtube vid of special forces doing it. The only thing missing is the Chinook's Load Master jumping out of the way at the last moment.

Well done. Awesome.

Share this post


Link to post
Share on other sites

Thanks bana. I didn't realize there was a special forces vid that does it lol, will have to check that out.

And yea there is code involved, but not very much. maybe 6 lines of external script.

___

Edit just watched that video, cool :) Their chinook is slightly wider tho haha :P

Share this post


Link to post
Share on other sites

Not being any good at scripting (I failed COBOL I - sheesh it's as close to English as a language can get), I will hazard a guess as to how you scripted the extraction video;

(Excluding Cam scripting);

- Action Anim_Ramp

- Put an invisible H about 0.5m - 1m above the water (or action AutoHover & Flyinheight 0.5/1)

- An attachTo the back of ramp

- An attachTo further up the ramp

- Possibly a 3rd AttachTo

- Maybe a few "Sleep" commands to smooth things out

- Fly to new waypoint and close Ramp

More than one attachTo moving progressively inside the Chook would allow smoother viewing.

JDog, the icing on the cake would be for the operators to "getOut" of the zodiac and moveInCargo of the Chook.

Share this post


Link to post
Share on other sites

1) There is no cam scripting, I've never even tried cam scripting yet lol

2) There is no helipad... it doesn't do anything over water, AI is too smart to try and land on it

3) There is only 1 attachTo, and it isn't set to any specific point. I am actually driving as far inside as you see it happen.

4) Don't think I had any sleeps... not that it would be a big part of solving this anyway

5) The ramp closes after you are in, as he starts lifting off the water

Also... moveInCargo is what I use to put myself in the copilot seat. However if you are in any of the rear seat (even the ones closest to the front), and the CRRC is in the back, it wont appear for you. It'll appear as if it's outside hanging on to the ramp from you seat, even though it's still inside.

I know that cuz I was just playing around with an "insertion" version lol... which is much harder. In that case I just may have to use a string of attachTo's, because it's quite hard to get it to flow out of the cargo area smoothly. It works about 50% of the time.

_____

Here's the scritps: http://forums.bistudio.com/showthread.php?p=1389139#post1389139

Edited by JDog
Included links to scripts

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  

×