Home   Help Search Login Register  

Author Topic: Get in a moving vehicle?  (Read 1914 times)

0 Members and 3 Guests are viewing this topic.

eddie6413

  • Guest
Get in a moving vehicle?
« on: 05 Dec 2002, 20:07:32 »
There is a couple things i wonder about...

1. How do i make a car stop and then continues to move when player has entered the car?

2. How do i make Blackhawk move after player has entered?

3. Does anyone has some pre-made camera scripts i can get?

Any help would be greatful...

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Get in a moving vehicle?
« Reply #1 on: 05 Dec 2002, 20:25:19 »
For questions 1 and 2, if you are using waypoints for the vehicle only, it's very easy.  In the condition fields of the respective Load waypoints, put the following code:

player in vehicle

Replace player with the name of the player, and vehicle with the name of your vehicle.  This will make the vehicle wait at that waypoint until the specified player is in the vehicle.  Once the player is in, the vehicle will be able to continue moving on to any successive waypoints.

OR

If you gave the player waypoints as well, just synchronize the player's Get In waypoint with the vehicle's Load waypoint.

For question 3, I'm pretty sure the Editors Depot has some useful camera scripts that you can use.  Try looking there.
« Last Edit: 05 Dec 2002, 20:30:40 by Ranger »
Ranger

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #2 on: 05 Dec 2002, 21:33:47 »
When i type that command to enter a car it works, but not Blackhawk. Blackhawk is just howering above me. I want Blackhawk to follow waypoints and then land so i can get in and then continue the waypoints after i'm inside Blackhawk.
How do i do that?

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Get in a moving vehicle?
« Reply #3 on: 05 Dec 2002, 21:39:39 »
Some people use the land command.  I always use the flyInHeight command.

1. Create an extra move waypoint almost on top of the helicopter's Load waypoint.

2. In the On Activation field of this Move waypoint, put the following code:

Code: [Select]
chopper flyInHeight 0
Replace "chopper" with the name of your helicopter.

3. In the On Activation field of the Load waypoint, put the following code:

Code: [Select]
chopper flyInHeight 30
Again, replace "chopper" as necessary.  Also, change 30 to whatever altitude you want the chopper to fly.  I think the default is 50.
Ranger

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #4 on: 05 Dec 2002, 22:36:12 »
Thanx, it worked. But i'd like to know how to make it land also if you know that. Without the pilot getting out.

Another question..How do i remove that blue line attaching me to a vehicle? I knew it before but i havent touched this game in a year or so so i have forgot. lol

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Get in a moving vehicle?
« Reply #5 on: 05 Dec 2002, 23:11:33 »
The flyInHeight trick does make the helicopter land without the pilot getting out.  Or did you mean land and turn off its engines?

If the latter, then supposedly the chopper land "LAND" command does that, although I haven't experimented much with it.  I think it'll only work if you do not have any waypoints after this command is issued, or else have the chopper wait at the waypoint succeeding the one that issued this command.  You should place those two waypoints nearly on top of one another for the effect to work, just as you did with the flyInHeight 0 waypoint.

In order to ungroup two units, follow these steps:

1.  Press the F2 key to choose the Group feature.

2.  Left click on one of the two units and hold the button.

3.  Drag the mouse cursor anywhere off of the unit, then release the mouse button.
Ranger

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #6 on: 05 Dec 2002, 23:57:08 »
Thanx again..Alot of questions from me..lol..but that's the only way i'll learn i guess.

Ok, i got one more..

I know about the "player in vehicle" to get me in and then  drive..but how do i make the car stop and i get out and then the car continues? By that i mean the car stops without shutting down engines..

and another question if you know this..

I want to make a logo appear on a trigger. I have made a logo in photoshop and i want it to appear like the "resource" thing... how do i do that?

And i also see the choppers land on a completly different place than the waypoint..how can i make the chopper lanf "exactly" on the waypoint? is that possible?
« Last Edit: 06 Dec 2002, 00:33:52 by eddie6413 »

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Get in a moving vehicle?
« Reply #7 on: 06 Dec 2002, 00:36:21 »
There are three ways to learn:

1. Search the forums and read past posts.
2. Search the Editors Depot and read the tutorials and code snippets.
3. Ask on the forums.

I try to do the first 2 first, and then ask.  Of course, sometimes you simply cannot find the answer even if it is already out there, so then you have to ask.

In any event, to make the car wait for you to get out, you check for the opposite of you being in the vehicle.

Code: [Select]
not (player in vehicle)
Remember, the not command (also written as !) makes the code check for the opposite.  E.g., alive player versus not alive player.  The first checks if player is alive, while the second checks if the player is not alive (i.e., he's dead).

So, you would place the above code in the condition field of the car's Transport Unload waypoint.  You would similarly synchronize that waypoint with your unit's Get Out waypoint.  This of course assumes that both you and the car have waypoints assigned.

As for the logo, I know it's possible, but I haven't tried it, so I don't know.  However, some of the tutorials in the Editors Depot might answer that question.  if not, hopefully some other kind soul here will answer your question.  :)

Good luck!
Ranger

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #8 on: 06 Dec 2002, 00:47:25 »
I can't get the not command to work..
No other way to do it?

And i added one more question as you wrote the above..lol..

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Get in a moving vehicle?
« Reply #9 on: 06 Dec 2002, 01:07:53 »
Using normal waypoints, there is no way to force a vehicle of any kind to stop or land exactly on a waypoint.

However, by using a script, you can make the vehicle appear exactly where you want.  If you do the script correctly, it might even look natural as the helicopter comes down to land.

Post your code regarding the not command so that I can see what you're doing.  Using not is the only way that I know how to check if someone is not in a vehicle.

Actually, I guess you could count how many people are in the vehicle, and if it's more than 2, then you know that someone else is in it beside the pilot and gunner.  But, that's an insecure way of doing it.
Ranger

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #10 on: 06 Dec 2002, 01:15:53 »
I put the "not player in vehicle" where i put the "player in vehicle".. same place.  I had a tutorial once that explained all this. It was a pdf tutorial containing scripts and pictures. this was about 7 months ago..but i lost it. Do you have a simular tutorial you can send me Ranger?
I remember this tutorial cause it was really easy to figure out.

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:Get in a moving vehicle?
« Reply #11 on: 06 Dec 2002, 01:19:48 »
Try putting parenthesis around the player in vehicle part, just as I had posted.

Again, that was:

not (player in vehicle)

For tutorials, just go to the Editors Depot on this site.  There's plenty of them.
Ranger

LAPD

  • Guest
Re:Get in a moving vehicle?
« Reply #12 on: 06 Dec 2002, 01:21:06 »
About the logo, I once asked about that. You can see the answer here: http://www.ofpec.com/yabbse/index.php?board=13;action=display;threadid=966

About the question with the chopper, you can't actually make the chopper land on the waypoint. The AI chopper will only land on a stright surface, and if you place the waypoint on a stright surface, it will land on it, but if you place the waypoint on a surface which isn't stright, it will lock for a stright surface in the area of the waypoint.

About the truck thing, in the condition field put:
Quote
not (player in truck)

Change player to your soldier name, change truck to your truck name, and set sail   ::)
After that, do what Ranger said, I think that should work.

LAPD

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #13 on: 06 Dec 2002, 01:45:48 »
Thanx both of you.. it worked!!

But i still cant figure out the chopper "land" thing..

Let me ask the question a little differently:

I want the chopper to land and shut off engines. (at a waypoint) I will then later make a trigger to make the chopper start again to continue its destination. I know this is possible..
but how do i do it? I haven't written any scripts yet, i've done all in the editor

If you don't know how to make it continue after engine shut off, i'd like to know how to make it stop, shut down engines..and the pilot does NOT leave the chopper.

Wolf

  • Guest
Re:Get in a moving vehicle?
« Reply #14 on: 06 Dec 2002, 04:44:43 »
Ok, first, another way to get a vechicle to stop, and stay there until you get out is to use the Tranport Unload waypoint, the vechicle will stop, and anyone not grouped to the truck will get out, including the player.

Now, as for the chopper, first place a invisible H(availeble in the empty objects section) on the ground where the chopper is to land, then make a waypoint, and put you Chopper Land "Land" in it, or us "Get in", "Get out" inplace of "land" in the on activation line, then create another waypoint exactly the same, connect it with your trigger, or condition, and place it DIRECTLY on the last one, and continue with the waypoints. This should work.

If not, I can post an example mission for you.

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #15 on: 06 Dec 2002, 13:58:31 »
I got another question ...

I don't know if this one can be done, but i'm asking anyway:

I am making a cutscene, and i want a visible small explosion on blackhawk. So it seems like blackhawk has been hit..
is this possible?

LAPD

  • Guest
Re:Get in a moving vehicle?
« Reply #16 on: 06 Dec 2002, 17:18:04 »
You mean you want your blackhawk to explode and destroied?
If so, I think you can do this in the On Activation field:

Quote
Blackhawk SetDammage 1

Blackhawk is the name of your blackhawk and you can change to 1 to 0.1, 0.2 and any other number between 0 to 1.
This will make it dammge. 0 is no dammage, and 1 is max dammage.

I hope this will do the job  :)
LAPD

eddie6413

  • Guest
Re:Get in a moving vehicle?
« Reply #17 on: 06 Dec 2002, 17:29:15 »
Does this just set damage or is it a visible damage too?
Cause like i said it is for a Cutscene. The camera will zoom in on Blackhawk and then i want a visible explosion to happen, so that this can be seen in the cutscene.

This is how i want it to be:

Blackhawk is flying over a forest, then the camera zooms in and there is a external explotion on blackhawk like it's been hit by something. The idea is to make this as realistic as possible. I want it to look like someone has shoot down blackhawk. ( Not like Black Hawk Down..lol , This is a completely different storyline)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Get in a moving vehicle?
« Reply #18 on: 06 Dec 2002, 17:50:57 »
no ;D i sugest u camcreat a shell on da blackhwk

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta