Comrades in Arms Discussion Board

Full Version: Ejecting crew at waypoint statement
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,

Creating a waypoint, and at its end I need to eject all crew, this is the waypoint statement:

_heloWp setWaypointStatements ["true", "hint ""hmmmm""; {unAssignVehicle _x; _x action [""eject"", vehicle _x]; sleep 0.5;} forEach crew vehicle this;"];

and getting this error: "Error Generic error in expression"

However... all units eject and carry on with what they are suppose to do, so everything is working fine... I can ignore this message, but would rather fix it.

Any ideas?

Thanks
sleep does not work in an unscheduled environment, and triggers, waypoints etc are all unscheduled


Code:
_heloWp setWaypointStatements ["true", "hint ""hmmmm""; {this spawn {unAssignVehicle _x; _x action [""eject"", vehicle _x]; sleep 0.5;} forEach crew vehicle _this;"}];

Try this, this should do the trick
thanks, it worked the same, still getting the error

Error Generic error in expression

just strange that the units are exiting the vehicle fine and moving to the next waypoint, even though this error occurs
Code:
_heloWp setWaypointStatements ["true", "hint ""hmmmm""; {unAssignVehicle _x; _x spawn {_this action [""eject"", vehicle _this]; sleep 0.5;}} forEach crew vehicle this;"];

Try this ?