OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Tom on 13 Jul 2006, 05:22:58
-
got another question for you...
im makin a mission where when you enter a small area trigger, the captive pilot within it is added to your group. Now I have tried this using the various tutorials ive picked up here and there, but whenever i entered the trigger i got this error in the top right corner of the screen:
'P2 join group me1 |#|': error type object, expected array
Any ideas on how to get this to work??
Thanks in advance.
-
just give the pilot a join waypoint on the player and syncronize it to the trigger
-
or if you want to put it in the trigger,
[p2]join group me1
-
I'm a bit Rusty when it comes to mission editing but i just did a quick test for a rather simple way Using 3 Waypoints and one trigger.
Give the captive pilot 2 waypoints, the first being a MOVE waypoint and then the second a JOIN
Now, give the player (or the players group) a JOIN AND LEAD Waypoint and have that waypoint near the JOIN waypoint of the Captive.
Next make a trigger that the player or group will pass through while moving to the JOIN AND LEAD waypoint, group that trigger to the player making sure that the box where it says Vehicle in the trigger is set to Any member of group.
Now Synchronize the Pilots MOVE waypoint to the trigger, that way, he'll only continue to his JOIN Waypoint once you activate the trigger.
Finally, this may be an unnecessary step but it seemed to work for me, synchronize the Join waypoint and the Join and lead waypoint.
Below is a rough screenshot of what that all would look like in the editor. If My instructions aren't clear enough for you, i can always send you an example mission so that you may understand it better
Example Image (http://files.photojerk.com/Rayven/examp.jpg)
-
One way to do this is with a trigger (a variation on what penguinman wrote, with a bit more info): 8)
Trigger
Radius: 0,0
Condition: None
Condition Field: joiningunit distance player < joindistance
OnActivation Field: [joiningunit] join (group player)
...where joindistance is a number of metres (I sometimes make it quite small, like 1.5 meters, but it could be 50 meters).
Although the Radius can be 0,0 as shown, and the trigger can be placed anywhere on the map, I often use the figure for the join distance used (e.g. 3 meters and place the trigger on the unit to join, so it is a reminder to me in the editor).
This way, you don't need any waypoints at all, the player just needs to get within range of the joining unit and they should join their group, provided they have spare "slots". Note that the player can already be in a defined group or not, the "group player" will always work (even if it is a group of one).
... I got the basis of this idea from Sui a long time ago, so credit to him with this.
-
thanks fellas. I'll be able to test to see if they work tomorrow morning. Well, to see if they work after i set em out because chances are im gonna get something wrong ;D.
Thanks again!