OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gooner861 on 23 Jul 2004, 16:29:51
-
Hi again ;D
Ok i have two trucks that are already grouped to two infantry squads so that the groups are in the trucks cargo.
But now i want the trucks to be grouped together so that i can have a single waypoint for both trucks so that they move at the same time etc, but i cant have two groupings from the trucks so what else can i do?
Cheers
Gooner
-
Hi
ok what i would do is ungroup the groups of soldiers from the trucks
then give the trucks names like, truck1 and truck2
then in the groups leaders init put:
mygrp = group this; "_x moveincargo truck1" foreach units mygrpreplacing truck1 with what ever the truck name is
now just group the two trucks together
hope this helps
cheers, Philly
-
Philly is right. In fact in mission editing you rarely have the cargo of a vehicle in the same group as the crew.
Put the trucks in column formation and setbehaviour safe, that will help make the convoy work.
Depending on what happens later on you may also need
"_x assignAsCargo truck1" foreach units mygrp
so that the AI "knows" it is in the truck. Otherwise you can have problems getting them out again.
-
:D hey m8. You can make relatively easy scripts that make yer groups get outta them trucks
each time the truck driver(s) feel unsafe & then get back in once the groups feel safe again, if thats what'cha wanna do. :)
...good for "back to the front" -missions, or if you want scouting groups to move along shores or alike...
the core spell goes like:
:-* "_x OrderGetin False" foreach morons (use true/false & loop the scroll with proper conditions)
-
Thanks that worked. ;D
Cheers
Gooner
-
there's also a nice script at the editors depot which keeps the convoy in a nice line and distance to eachother.
-edit-
In fact, it's in a KB entry. Search the KB on "Convoy" and you'll find the script.