Home   Help Search Login Register  

Author Topic: Name a VehicleCreated object  (Read 985 times)

0 Members and 1 Guest are viewing this topic.

Robinhansen

  • Guest
Name a VehicleCreated object
« 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

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Name a VehicleCreated object
« Reply #1 on: 09 Jun 2005, 18:46:05 »
when you say the same name, what do you mean exactly?

you can name vehicles created by giving them a variable, like this:

Code: [Select]
tank = "M1Abrams" createVehicle getmarkerpos "tankFactory"
tank can then be referenced by other scripts...

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Name a VehicleCreated object
« Reply #2 on: 09 Jun 2005, 23:19:37 »
But I would not use the word tank on its own.  It is a defined term in OFP.

Tank1 Tank2 etc. would be fine.

Robinhansen

  • Guest
Re:Name a VehicleCreated object
« Reply #3 on: 10 Jun 2005, 13:39:36 »
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... :-\
« Last Edit: 10 Jun 2005, 13:40:17 by Robinhansen »

hermano

  • Guest
Re:Name a VehicleCreated object
« Reply #4 on: 30 Jun 2005, 15:33:09 »
Try this:
"Mortar" CreateUnit [_destination,_group,"heitin1 = this",1,"PRIVATE"]
(comref: type createUnit unitInfo)
h

Offline MachoMan

  • Honoured
  • Former Staff
  • ****
  • KISS, Keep it Simple Stupid
Re:Name a VehicleCreated object
« Reply #5 on: 30 Jun 2005, 16:26:16 »
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.
Get those missions out there you morons!

hermano

  • Guest
Re:Name a VehicleCreated object
« Reply #6 on: 05 Jul 2005, 12:13:18 »
Sorry,ignore my post above, bedges already gave the right answer:
heitin1 = _vehicleType createVehicle _location
 ;)
h