Jump to content

Vehicle Scripting


GRIM-GENERAL

Recommended Posts

Just assign the 'Panhard_Passengers' to 'your_panhard's_name_here' and un-check the 'CREW' Checkbox. Here is an example of my script for one of my maps:

<element type="ActivateVehicle" vehicle_id="truck_1" start_time="0.1"/>

<element type="OrderCar" vehicle_id="truck_1" order="move" position="-38708 17265 0" start_time="2"/>

You do NOT need to use 'ActivateGroup', because this is a vehicle. The passengers, etc will unload and defend the area around the Panhard.

Hope this helps.

Rampage

Link to comment
Share on other sites

Ill make a short tutorial for you right now:

Vehicle Setup

1.) Name the vehicle in Vehicle ID to something you want, for example "tr."

2.) Check the Sequence Spawn check box.

3.) Make sure the vehicle is set to hostile.

VehicleSetup.jpg

Crew Setup

1.) Set the Group ID to the same name as the Vehicle's ID.

2.) Set the Transport ID to the same name as the Vehicle's ID.

3.) Check the Crew check box.

CrewSetupCars.jpg

Passenger Setup

1.) Set the Group ID to the same name as the Vehicle's ID.

2.) Set the Transport ID to the same name as the Vehicle's ID.

3.) Un-check the Crew check box.

PassengerSetupCars.jpg

The Script

<event name="start_game">

<element type="ActivateVehicle" vehicle_id="tr" start_time="1"/>

<element type="OrderCar" vehicle_id="tr" order="move" position="-2932 12754 0" start_time="3"/>

</event>

hope this helps now...i did not cover it very well in my first post in this thread.

Edited by Rampage10.0
Link to comment
Share on other sites

nj Rampage. That is how I set them up as well. Question while on the subject. If you have 2 Panhards 1 on each side of a map, is it possible to have 2 vehicle waypoint paths and have them both follow them independantly?

In other words, I want to have them each triggered at different times and just follow where I tellthem to go. What I see is the 1st event works perfect, but later in the map when the 2nd is triggered it tries to find the 1st Vehicle graph. It may just be that I have to redo the graph better, but I figured I would ask anyway because the map will have approx 6 vehicles in transit as the map goes on.

Link to comment
Share on other sites

nj Rampage. That is how I set them up as well. Question while on the subject. If you have 2 Panhards 1 on each side of a map, is it possible to have 2 vehicle waypoint paths and have them both follow them independantly?

In other words, I want to have them each triggered at different times and just follow where I tellthem to go. What I see is the 1st event works perfect, but later in the map when the 2nd is triggered it tries to find the 1st Vehicle graph. It may just be that I have to redo the graph better, but I figured I would ask anyway because the map will have approx 6 vehicles in transit as the map goes on.

So are you saying you want ONE vehicle to move to a different location at a different time? I believe this is possible, but I have not tried it. I would guess that you would have the vehicle move to a different location once a person enters a trigger area, or you would make it move some time later. For example:

<event name="start_game">

<element type="ActivateVehicle" vehicle_id="tr" start_time="1"/>

<element type="OrderCar" vehicle_id="tr" order="move" position="-2932 12754 0" start_time="3"/>

<element type="OrderCar" vehicle_id="tr" order="move" position="-2259 5003 0" start_time="50"/>

</event>

You could also make a trigger area for the vehicle to move when a player enters that area, but I have not tried that yet. The script I just showed you works great for tanks helicopters, but I have not tried it with Panhards.

If this was not the information you wanted, sorry.

Rampage

Link to comment
Share on other sites

  • 3 months later...

The script I just showed you works great for tanks helicopters, but I have not tried it with Panhards.

This is really weird. As far as I have implemented vehicles, such a script work fine for the panhards and trucks, but tanks won't move a bit.

One of the crew is placed beside the tank and the other is lying in a strange way on the top. Maybe I have chosen the wrong type of crew but 'tankcrew' are the crews from mayday and on the other vehicles every type works.

The tank is activated as it fires the machinegun but I can't move it.

Is there something special about tanks? Do I need something like 'OrderTank' like the 'OrderHeli' commands?

Link to comment
Share on other sites

The script I just showed you works great for tanks helicopters, but I have not tried it with Panhards.

This is really weird. As far as I have implemented vehicles, such a script work fine for the panhards and trucks, but tanks won't move a bit.

One of the crew is placed beside the tank and the other is lying in a strange way on the top. Maybe I have chosen the wrong type of crew but 'tankcrew' are the crews from mayday and on the other vehicles every type works.

The tank is activated as it fires the machinegun but I can't move it.

Is there something special about tanks? Do I need something like 'OrderTank' like the 'OrderHeli' commands?

Check the scripting document in the downloads section of this site. It has all the commands listed and which vehicles use which commands. And yes, there is an OrderTank command which you'll have to use for tanks.

Link to comment
Share on other sites

I've just tried to use the command 'OrderTank' and the tank moves, but straight to the position 0 0 0.

The AI graph doesn't allow this movement and it doesn't matter which position I order the tank to move.

Can somebody tell me, what I'm doing wrong?

THX

Okay, thaks for the info. I will check!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...