OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: dmakatra on 14 Oct 2002, 21:30:58

Title: creating a midmission unit
Post by: dmakatra on 14 Oct 2002, 21:30:58
IÂ'm making a single player mission, and needs help with this:

How do you create a unit or veichle in middle of a mission, I know you can do it becasue I could but I do not remeber it when I need it now :'(

thx in advance
Title: Re:creating a midmission unit
Post by: Black_Feather on 15 Oct 2002, 05:15:23
there's two ways

"SoldierWB" CreateUnit [GetPos someplace, grouptojoin]

or

tank = "M1Abrams" CreateVehicle [9777,4080,0]
Title: Re:creating a midmission unit
Post by: DrStrangelove on 16 Oct 2002, 13:35:01
"SoldierWPilot" createUnit [getpos here, dummygroup,"soldier1=this"]

... that will give the unit the name of 'soldier1' ingame. Good if you need to delete this unit later.

Uhm - sorry to hijack topic, but doesn anyone know what the name of the 1st unit will be when i call the upper command 2 or more times ?
It seems the game changes the names dynamicly, only the last created soldier is named 'soldier1'. What are the other names ?
Title: Re:creating a midmission unit
Post by: Black_Feather on 16 Oct 2002, 13:48:55
I think it would be soldier1_1
Title: Re:creating a midmission unit
Post by: david-p on 16 Oct 2002, 14:32:34
yup soldier1_1, 1_2, 1_3 and so on.
Title: Re:creating a midmission unit
Post by: LCD on 16 Oct 2002, 15:18:57
no it will just b unnamed again

u changed da value of soldier1 to da last soldier nd all da oders got unnamed

LCD OUT
Title: Re:creating a midmission unit
Post by: dmakatra on 16 Oct 2002, 19:41:33
thx for the help :cheers: