Home   Help Search Login Register  

Author Topic: giving a name to a created vehicle  (Read 630 times)

0 Members and 1 Guest are viewing this topic.

stalin

  • Guest
giving a name to a created vehicle
« on: 31 Mar 2003, 16:15:55 »
At one point in my mission I want to create a police jeep.
looks like this:

_jeep1 = "JeepPolice" createvehicle getpos g5

Later in the mission i want to delete it (With another script) . How do i give the jeep a name in the createcehicle script so it can easily be deleted later? :-[

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:giving a name to a created vehicle
« Reply #1 on: 31 Mar 2003, 16:27:35 »
Check out createUnit in the command ref, that might help.   You can name the unit in the init field.

Looking at your example it seems to me that you have already named your vehicle _jeep1.     Try naming it jeep1 instead and then deleteVehicle jeep1 to see what happens ..... _jeep1 might not work because of the local variable thing.   (variables starting with _ are local, not global.    Would that make a difference here?  I have no idea.   Suck it and see.)
Plenty of reviewed ArmA missions for you to play

Cap

  • Guest
Re:giving a name to a created vehicle
« Reply #2 on: 31 Mar 2003, 16:50:16 »
Or couldn't you have the vehicle already on the map, just on an island out of the way, then use the...

jeep1 setpos (getpos g5)

command. It goes something like that.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:giving a name to a created vehicle
« Reply #3 on: 31 Mar 2003, 21:31:10 »
There's something fishy in deleting created units and vehicles. I haven't gotten the hang of it yet, and as for the time being it's impossible for me to delete what I have created.
Not all is lost.

stalin

  • Guest
Re:giving a name to a created vehicle
« Reply #4 on: 31 Mar 2003, 21:35:40 »
yes it's tricky.. I can't even delete the vehicle in the same script that created it using the local variable..

guess I'll work around it by teleporting vehicles to where they are needed for now :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:giving a name to a created vehicle
« Reply #5 on: 03 Apr 2003, 19:22:56 »
lol

name it in global name w/o underscore @ start :P

den delete da jeep1

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta