OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: k.rob on 29 Jun 2003, 06:35:15
-
Hi there, I've been playing OFP off and on for a while and have a small grasp of mission editing. This weekend 5 of my workmates and I, had an excellent multiplay LAN game and it's inspired me to get back into learning to make missions ;D
Now I've searched the FAQ and checked the forums but I haven't been able to find out how to add units to a group dynamically.
For example a squad of 3 men under your command is reinforced by another 7 men....these men are added to your squad allowing you to command them.
I'm sure this is probably a really simple question but I'd appreciate any help ;D
Thanks
-
Try this !!! ;D
[Man1,Man2,Man3,Man4,Man5,Man6,Man7] JOIN Player
Man1-7 are the names of the units that you want to join.
-
:thumbsup: Yup! All ya need to do is to NAME each moron in a group,
and you can make arrays outta them unitNames: "man1, man2, man3" ... etc. :-*
Like this:
MyArray = [bob, rob]
or:
MyDrunkenArray = MyArray + [Tomb] :-X
:D Ya could make an array outta guys from many different squads if ya like to.
Just put this in a trigger/script:
morons = [a,b,c]; "[_x] join player" forEach morons
:o All ya gotta remember is that groups can only consist of max. 12 units!
So if 5 d00ds wanna join yer team, ya better make sure that you only have 7 or less room mates already.
And units can LEAVE groups as well as JOIN groups,
[bob, rob] join GrpNull
That would make bob & rob leave yer group of troopers, provided they're named bob & rob
Right, that'll be it. *cough* ::) ;D
-
Excellent, thanks for the help guys 8)