OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: NoFear on 27 Mar 2003, 21:31:09
-
Now its my turn to ask something (WEEEE!)
Ok, im making a ww2 mission where you as red devils are infiltrating german territory and destroys a few howitzers, everything is good until here... oh.. No, its the infiltrating thing thats wrong. The devils are infiltrating the german territory by a opel blitz drove by two germans, and i couldent put the germans in the same group as the devils because then the devils leader would be in the front seat and i dont want the germans to lead the group, so i got the devils in the opel by moveincargo command, but i cant get them out whit waypoints and if i use the action ["blah",blah] they are trying to get in to that demon-on-four-wheels-called-opel as soon they get out... What to do i wonder? ??? ??? ??? ???
NoFear
-
Can't you just create a transport unload wp for the truck?
::)
-
unassignVehicle unit
Operand types:
unit: Object
Type of returned value:
Nothing
Description:
Person is unassigned from the vehicle. If he is currently in, group leader will issue order to disembark.
Example:
unassignVehicle player
-
Thanks guys, and Knut Erik, ive tryed that, when i put a transport unload waypoint it only unloads the german cargo unit
-
OK, there are a few methods how to solve this problem,
but my favourite one is:
At the waypoint, where you want to unload your cargo troops,
use the unassignVehicle command. The waypoint should be
a simple: move waypoint.
Waypoint's activation field:
"unassignVehicle _x" foreach units name_of_cargo_group; getout1 = true
Now create a trigger:
size: 0/0
activation: none
type: switch
condition: getout1
If your cargo troops are mounted on the vehicle right from
the beginning of the mission, you just need to place it's first
waypoint on top of the groupleader (waypoint type: HOLD)
Now syncronize this HOLD waypoint with the switch trigger
(press F5 and drag a line).
As second waypoint place a getout waypoint, nearby the
MOVE waypoint of the transport unit.
What will happen:
transport unit moves to waypoint, where it says: whole group
unassignVehicle and boolean: getout1 will change to true -
then the switch trigger will activate the second waypoint of
the cargo troopers, where it says: getout (GETOUT wp in combination with unassignVehicle is the very best medicine).
No need to syncronize the getout wayopint with any waypoint
of the transport unit.
btw - the same method you can use with assignvehicle and
a GETIN waypoint.
If you assign units to a vehicle (e.g: unit1 assignascargo truck1)
and the unit steps onto a GETIN waypoint (regardless where
the wayoint is and where the vehicle is) it will mount the
assigned vehicle.
Something else?
Ah yeah, if your troopers aren't mounted straight from the beginning of the mission on the car, you need to place the HOLD
waypoint as a previous waypoint of the GETOUT waypoint.
e.g:
wp1: MOVE
wp2: MOVE
wp3: GETIN (they enter the vehicle now)
wp4: HOLD - syncronized with the switch trigger
wp5: GETOUT
hope this helps
~S~ CD
-
Ok, ill try that and thanks
-
no fear ....
I had a similar prob. a while back and I solved it with :
unit_name action ["EJECT" , vehicle unit_name]
try it
-
no fear ....
I had a similar prob. a while back and I solved it with :
unit_name action ["EJECT" , vehicle unit_name]
This will work aswell, excepting the vehicles aren't driving
while ejecting them ....aaaaaaggghhhhh - oh no ... is down
~S~ CD