Asgard 0 Posted December 23, 2001 how can i give a name to a unit created with the createunit - command? if i use: civ1 = "Civilian" createunit [position,group] then civ1 is NOT the name of the unit. And how can I create a unit, that is NOT in a existing group, or is its own group? ____________________________________ ASGARD switchmove "effectstandsalute" Share this post Link to post Share on other sites
Damage Inc 0 Posted December 23, 2001 To create a unit that's not in a group, type null in place of the group name (I think that's how it works). Share this post Link to post Share on other sites
Damage Inc 0 Posted December 23, 2001 I mean, grpNull. (Edited by Damage Inc at 7:34 pm on Dec. 23, 2001) Share this post Link to post Share on other sites
Asgard 0 Posted December 23, 2001 no, GrpNull does not work either :-( thx anyway! Share this post Link to post Share on other sites
Asgard 0 Posted December 23, 2001 Quote Command reference 1.40: "Delete any unit or vehicle..... " WORKS: test = "Tractor" createvehicle pos deletevehicle test DOESNT WORK: test = "Civilian" createunit [pos, group] deletevehicle test Share this post Link to post Share on other sites
crashdome 3 Posted December 23, 2001 I was under the assumption that createvehicle and deletevehicle go hand in hand, but Createunit is altogether different. There is no "deleteunit" command for instance. So if you create a unit enter a new group name - i.e. "newguy" and he will be by himself. Then if you want to get rid of him try just kill him off or send him into the far reaches of the map into water somewhere. Share this post Link to post Share on other sites
rellis32 0 Posted January 24, 2002 Are you sure this works? the above statement I mean. I was under the assumption that there had to be an existing group to assign the new unit to. I have tried creating a man with a different group name to no avail. If there is a way around this please post Share this post Link to post Share on other sites
Spinor 0 Posted January 24, 2002 I´m also sure that you can only create a unit in an existing group. As a workaround spawn the unit in a dummy group, then use [unitname] Join grpNull and the unit will be alone. To name the created unit try this as the Init-line parameter of createUnit: "unitname = this" Sadly, when used in a script, this crashes the game for me. Using it in a trigger works fine. Once named, it should be deletable with deleteVehicle Hope this helps, Spinor Share this post Link to post Share on other sites