OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Robinhansen on 09 Jun 2005, 16:09:31
-
I've using at script to VehicleCreate some objects (FDF_Mortars) How can I give the same name every time in order to have other scripts working along them
-
when you say the same name, what do you mean exactly?
you can name vehicles created by giving them a variable, like this:
tank = "M1Abrams" createVehicle getmarkerpos "tankFactory"
tank can then be referenced by other scripts...
-
But I would not use the word tank on its own. It is a defined term in OFP.
Tank1 Tank2 etc. would be fine.
-
This is the name of the mortar:heitin1. I use the script below to vehicleCreate the mortar by an AI.
Somewere in this script the mortar needs to be named heitin1 or else other related scripts won't work... :-\
-
Try this:
"Mortar" CreateUnit [_destination,_group,"heitin1 = this",1,"PRIVATE"]
(comref: type createUnit unitInfo)
h
-
Aah you just want your variable to inference with the standard FDF stuff, right? What you do not understand (I think) is that there are global variables.
heitin1 is probably just a global variable, so if you replace _mot with heitin1 you should be fine.
-
Sorry,ignore my post above, bedges already gave the right answer:
heitin1 = _vehicleType createVehicle _location
;)
h