OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: RolsRois on 28 Oct 2005, 22:17:40
-
Hello folks, so this is the problem... im not so fimiliar with the CreateUnit Command, and i need help.
if i want an object, let's call it object, so how do i make it to setpos getpos the player, CREATE IT not setpos getpos something that exits, and the player's name is dude, how do i create it next to the player? i need the full script line not an explanation please ;D
-
if you could explain a little more clearly, perhaps it would be easier to help. :-\
-
Do you mean something like this?
soldierWB createunit [getPos dude, dudesGroup, "dude2=this", 1, "CORPORAL"]
or
objectname camCreate getPos dude?
-
your original post refers to the createunit command but the item that you want to create is referred to as "object
If the item is a soldier unit then createunit is the correct command to use
however if the object is indeed an object such as an ammo crate or a vehicle, then you need to use the createvehicle command
-
Say U want an ammocrate next to your player:
_MyNewCrate="Reammoboxwest" createvehicle getpos player
Next step:
_MyNewCrate="Reammoboxwest" createvehicle [getpos player select 0,getpos player select 1]
Now U can adjust the position of your crate:
_MyNewCrate="Reammoboxwest" createvehicle [(getpos player select 0)+10,(getpos player select 1)-20]
To find out the Type of the object:Put your object in the editor with this initline:
hint format ["%1",TypeOf this]
-
I Solved this one out, but i need more help folks.
i need to addaction to the unit im creating, the cow
this is the command that works:
"Mig_Cow" createunit [getpos seller1, east1,"", 1, "LIEUTENANT"]but i need to put between the "" this addaction ["Milk","milk.sqs"]
but i can't, cause it makes errors, so how can i addaction?
-
"Mig_Cow" createunit [getpos seller1, east1,"this addaction [{Milk},{milk.sqs}]", 1, "LIEUTENANT"]
untested.
-
THANK U BEDGES THANK U THANK U THANK U! UR A LIFE SAVER!