OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ace Productions on 20 Apr 2004, 13:38:53

Title: Problems with CamCreated units
Post by: Ace Productions on 20 Apr 2004, 13:38:53
Hi everybody,

How can u name a unit that was CamCreated? I used Thomas = "SoldierEB" CamCreate (GetPos GL1) where GL1 is a gamelogic unit.

The unit appers where his expected but doesn't execute any other commands in the script. When I tried something like Thomas DoMove GetPos John Thomas doesn't want to cooperate! Is there any other way to name the unit?
Title: Re:Problems with CamCreated units
Post by: myke13021 on 20 Apr 2004, 14:18:55
why do you use camcreate? use createunit instead and then he should follow your orders without any problems.

i think, camcreated units are just "objects, that look like a soldier" but is not equipped with AI...lol...sometimes i love my descriptions ;D
Title: Re:Problems with CamCreated units
Post by: Chris Death on 20 Apr 2004, 17:56:44
I second that what myke said above - use createunit
instead of camcreate.

To name units with createunit, it would look summit like that:

crew1 = "bassoarpilot" createUnit [_pos, wpilgrp, "w1pil = this", 1, "CORPORAL"]

:note - _pos is a positional array (like you get by getpos object),
wpilgrp is an already existing group.
"w1pil = this" is the part where you would name the unit,
1 = unit's skill (value from 0 to 1)
"CORPORAL" = guess what - is the unit's rank

~S~ CD
Title: Re:Problems with CamCreated units
Post by: Black and White on 21 Apr 2004, 00:29:10
or u can use createvehicle to create empty vehicles...
Title: Re:Problems with CamCreated units
Post by: Ace Productions on 22 Apr 2004, 12:29:45
My thanks to all of you guys for your replies.