(folds up shirt sleeves) Ok, lets have a look at the two problems at hand, shall we? Note that there may be more than one way to solve these things, depending on how you have things set up in the mission. Anyway, I'll note the assumptions I make as we go along.
1. The hostage should follow your team no matter which player is triggering him to join the team. (at the moment he can only be triggered by the group-leader [tag])
If the hostage (politician) is stationary (not moving, e.g. in a house ), do as follows:
[1] make a small trigger somewhere near the hostage, elliptic, with say axis a and b set to 1 m.
[2]zoom in on the map and drag that tiny area trigger on top of where the hostage is.
[3]choose "F5 - Synchronize" and "connect" the trigger with the player group's leader.
[4]open up the properties dialog for the trigger (double-click it). Have a look at the "Activation" drop-down menu and select
"Any group member"[/list]Now we have a trigger that is activated by anyone in the player group getting within 1 meter of the hostage. In the trigger's On activation field, put
[politician] join player
...and zoink - you have rescued the poor fella. :-)
2. if you enter e vehicle, he should automatically enter the same vehicle, whatever it's name tag is (don't want to set up a trigger for every vehicle available in the mission :-) also he should leave the vehicle if you do, and shouldn't have to be triggered in a special location...
(Scratches head) Ok... let's see... off the top of my head, I can think of a few ways to do it:
- Add a "getin" event handler to all vehicles the player might use and let that event handler run a cunning script to get the hostage to enter same vehicle
- Have a sort of monitor script running, checking wether or not the player is in a vehicle from time to time and upon noting that the hostage is rescued and the player has entered a vehicle, get the hostage to enter same transport.
- Require the lazy player to boss around the hostage, manually telling him to mount the player's ride. I like this one, since I won't have to tailor-make a scripting solution for you. ;-)
Take a moment to consider these tree possible solutions and tell me what you think would fit.
PS. PheliCans script can be tweaked/bug fixed like so:
#loop
_nearUnit = neatestObject[politician, "Man"]
?(_nearUnit in (units player)) : [politician] join player
~0.5
goto "loop"
Changed two things: 1 - it's the politician that should join the player group, not whomever is nearest to the politician. 2 - waiting only 0.01 secs between iterations is a waste of valuable CPU time. OFP, as we all know, chews CPU like its going out of fashion... ;D
(and switch; thanks for your advice to the transport question!)
You're welcome! Please go back to that thread and mark it as "problem solved". Helps keep the forum neat and tidy.