ManDay 0 Posted June 9, 2007 So createUnit will spawn a unit of the give type. There are two variants: http://community.bistudio.com/wiki/createUnit http://community.bistudio.com/wiki/createUnit_array So I want to spawn a tank with a crew inside. What should I use? sry titel is not good Share this post Link to post Share on other sites
fasad 1 Posted June 9, 2007 As far as I understand it, you need to do this : createVehicle createGroup (new units need to be created within a group) createUnit (either syntax, for each crew member) assignAsXXXXX (for each crew member) moveInXXXXX (for each crew member) Share this post Link to post Share on other sites
ManDay 0 Posted June 9, 2007 I know but what is the difference between the creatvehicle/unit commands in ofp and new introduced with arma? well - let me reput it: is there any advantage of the old command over the new. cos the new doesnt seem to work correctly by what i can get fromm the comments: Although this command takes a group as an argument, you need to use the join command if you want the created units to perform actions such as move. For example:- Share this post Link to post Share on other sites
fasad 1 Posted June 9, 2007 I'm quoting and paraphrasing the wiki, but okay : createUnit allows you to specify: type createUnit [position, group, init, skill, rank] createUnit does not return the unit createUnit array allows you to specify: group createUnit [type, position, markers, placement, special] createUnit array does return the unit Key differences : createUnit Array lets you specify a formation "special" for the unit to appear in. createUnit Array lets you assign a random radius in which the unit is to spawn. createUnit Array lets you name the unit in a slightly more normal method. createUnit Array lets you use markers to create the unit in random position (I haven't tested this?). createUnit Array can not specify the skill (use setSkill) createUnit Array can not specify the rank (use setRank) createUnit Array can not specify the unit's init line (<s>i seem to remember reading that we can use setVehicleInit on units, 1.08+</s>}, was thinking of setVariable) I'd say createUnit Array is more useful because it can create a unit in formation or in a random radius. Both are essentially the same in that they create a new unit. As far as I see it, you can reproduce all the other "abilities" using other commands. The init line may be the exception, but there is always more than one way of doing the same thing. Share this post Link to post Share on other sites