OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Cheo on 29 Jun 2005, 17:22:42
-
Hi all,
I'm a noob and I red almost all posts, but I can't find out how to check 2 or more units (player and/or AIs) to be inside a vehicle.
I want this to start a conversation using game logics (which is done) when BOTH the player and the AI are inside the vehicle. I managed to do this when either the player is inside the vehicle or the AI, but not both at the same time.
I use the condition field of the trigger but I think a need to call a script for this.
Anyway, any comment would be really a useful help. :-\
-
condition field of trigger -
(unit_1 in vehicle_name) and (unit_2 in vehicle_name)
see attached missionette, and look at the trigger...
-
Thanks a lot!
It works perfect. The more simple the better (more easy imposible).
-
What if I want to check when the player/unit is out from a vehicle?
What's the command?
-
not (unit_name in vehicle_name).... ::)
thing is, if you put that in a trigger it will fire straight away if the unit starts outside the vehicle. i would declare another variable, something like 'has_been_in_vehicle', set it to false at the very start, and then once the unit gets in, set it to true.
then in the 'getting out' trigger's condition field, put
has_been_in_vehicle and not (unit_name in vehicle_name)
don't worry, it gets easier as time passes ;)
-
Or if you want check for any vehicle;
vehicle player == player
Use this command to check if player is not in a vehicle.
And;
vehicle player != player
Use this command to check if player is inside any vehicle
~S~ CD