OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Lucky Ed on 02 Jun 2009, 17:03:52
-
[Skip a rambling mans rambling jump to "problem"]
So once, about a lifetime ago, I bought the orignal OFP or OPF or what ya wanna call it, got bitten by a rabid scripting seagull and startet pooring out missons for friends and familiy... So when ArmA2 got out I thought: "hmm.. scripting was rather fun and I'm in lack of an all time consuming hobby at the moment, so let's try that again". :D
But for the love of god I have forgotten everything, or everything has changed in editing since then.
Well enough rambling from me.
Problem.
I'm trying to do a simlpe thing as putting a group of men into the cargo of a BMP.
This is what I do
I Write this in the init of the group leader: "OPFOR1 = group this; OPFOR1 moveInCargo BMP1"
That's should do the trick I think... but nooo.. No units in the cargo.
So I try this,
Instead og just putting "OPFOR1 = group this" in the leaders init box, I do it for all the units...
Dosn't work either.
Only thing I can get to work is putting "this moveInCargo BMP1" in all the units I wan't to get in there, but that kind of defeats the purpose of having a "group".
Please educate me as I love this game and hate being a noob again. ;-)
-
Use something like this :
{_x moveincargo bmp1} forEach units group player;
-
And welcome back ;)
-
For gods sake, I must be getting dumber by the years... I just can't get anything to work.
Have they changed the way you make groups in ArmA 2? I can't seem to get them to respond to group commands. :(
-
groupOne = group this;
-
Tried that. didn't work... :(
[Edited]
Ok got the group thing working. turns out the group get's the name that is defined in the leaders name "box"
So no more group1 = group this
Just make a couple og units "F2 Group" them together and name the leader... whola!
Another thing that some1 might help with.
I'm trying to make an ambush with a TOW and a MG nest. I've set initialization to "MG1 setCaptive true" and "TOW1 setCaptive True" so they won't get spotted to early. This works fine
But....
In a trigger I then put "MG1 setCaptive false" when OPFOR is present. But the "setCaptive" dosn't turn "false" it just stays true...
Looked through the ArmA Command Reference and can't find the "setCaptive" command. does Arma use something diffrent?
Man I hate feeling so noob again. >:( And thanks for the welcome. :D
-
OFPECS Comref (http://www.ofpec.com/COMREF/index.php?action=details&id=289)
group1 = group this simply names the groups. Your right you need to group the units together.
-
For everyone reading this topic, for the setCaptive problem please refer/reply to this thread (http://www.ofpec.com/forum/index.php?topic=33450.0) instead.
Lucky Ed, you should have just posted that question into a new thread to begin with. 'Multiposting' the same question is a no-no...
-
Yeah I know that... sry... late night. ;-) Won't happen again.