OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 18 Dec 2004, 16:23:30

Title: giving the loons names...
Post by: bedges on 18 Dec 2004, 16:23:30
i'm creating new soldiers using <createunit> but need to give them names to be accessed via script - or any other command for that matter. how do i do this?

i had thought it would be as simple as

Code: [Select]
newsoldier = "SoldierWB" createUnit [getPos bert, groupAlpha]
enemy1 dofire newsoldier

but not so it seems. or is it?

 ???
Title: Re:giving the loons names...
Post by: MI_Fred on 18 Dec 2004, 16:39:19
Code: [Select]
"SoldierWB" createUnit [getPos bert, groupAlpha,"newsoldier1=this",1,"PRIVATE"]

So almost as simple as you though. That's the init line of the createUnit command where you must name the new guy.
Title: Re:giving the loons names...
Post by: bedges on 18 Dec 2004, 16:42:39
 >ping< wee lightbulb switches on over bedges' head.

thanks.

actually, that solves two problems come to think of it. so again, thanks ;)