OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Geffo on 30 Sep 2002, 01:18:57

Title: How can I name a created unit
Post by: Geffo on 30 Sep 2002, 01:18:57
Hi. I've been playing about with creating units in a script. My problem is that I don't know how to name them or identify them for the rest of the script to work. Any ideas or script snippets would be very appreciated. Thanks.        
Title: Re:How can I name a created unit
Post by: LCD on 30 Sep 2002, 02:55:24
u mean da crateunit command ?

wel just out in da init line

Code: [Select]
unitname = this

or a ful example (lets name him bob)  ;D

Code: [Select]
"SoldierWB" createUnit [position, groupname,"BOB = this",skill(num),private]

LCD OUT
Title: Re:How can I name a created unit
Post by: Geffo on 01 Oct 2002, 02:20:36
Thanks LCD, all is now clear. I thought I had to name the created unit with a _this select 0 or whatever. I did not realise a plain name would work inside the script. I Learn something new every day. Now if someone could donate me a few brain cells to make up for the billion or so I blitzed in my youth I might just get ontop of this scripting biz. Thanks again. Geffo out.