NEVER execute a script from the init line of a unit.
why???
I don't see any problems with running a script from the
init line of a unit.
btw, just for info:
_truckguys = group _captain
could be exchanged with:
_truckguys = units _captain,
that way you could say:
"_x moveincargo _car" forEach _truckguys
Sometimes i do notice problems in scripts, when trying to
access units around two corners.
let's say:
_man = _this select 0
_units = units _man
"_x dosomething" forEach _units
this works fine, but:
"_x dosomething" forEach units _this select 0
doesn't work (not sure if it was especially that case, but at least
similar to that).
The problem is that the script cannot create a reference point
to unit _this select 0, as _this select 0 represents an element
of an array.
Try to put all objects/units, you need in a script, into it's/their
very own variables.
Also when debugging your scripts, try to display all contents of
your variables, to see wether they got defined properly;
hint format ["%1", _captain]
or:
hint format ["%1\n%2\n%3", _captain,_truckguys, units _truckguys]
~S~ CD