Home   Help Search Login Register  

Author Topic: Empty vehicles in trigger  (Read 1407 times)

0 Members and 2 Guests are viewing this topic.

Uldics

  • Guest
Empty vehicles in trigger
« on: 09 May 2004, 20:14:50 »
I have a trigger, where I have placed some empty tanks. I want to make an array of those tanks.

_tanklist = list triggerW
_tanksleft = "LandVehicle" countType list triggerW

Both of these lines are not working in my script. I have placed following in my triggers condition field:

LandVehicle in thislist

But it is not activating the trigger, so I could count and get my tanks in the array. So, what should I write in the trigger?

Unnamed

  • Guest
Re:Empty vehicles in trigger
« Reply #1 on: 09 May 2004, 21:57:39 »
Make your trigger detect anybody rather than a certain side.

But there are better ways than triggers, in the first empty vehicle you placed in the editor add this to it's init field:

Code: [Select]
MyEmpties=[This]
Then for every additional one you add, put this in there init fields:

Code: [Select]
MyEmpties=MyEmpries+[This]
This way you will have a global array with all the empty vehicles in it. Plus you wont have redundant triggers banging away, thoughout the duration your mission.
« Last Edit: 09 May 2004, 21:58:23 by Unnamed »

Offline nEO iNC

  • Contributing Member
  • **
Re:Empty vehicles in trigger
« Reply #2 on: 10 May 2004, 09:45:54 »
Hey guys, Unnnamed is right about the trigger, empty vehicles are classed civillian...

Uldics

  • Guest
Re:Empty vehicles in trigger
« Reply #3 on: 11 May 2004, 21:58:07 »
Thanks a lot! It's working and it's simple! How didn't I think of that! :)

Uldics

  • Guest
Re:Empty vehicles in trigger
« Reply #4 on: 12 May 2004, 22:15:32 »
By the way, why isn't the array working, when I define it in Init.sqs and just add the tanks to it in their init lines?

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Empty vehicles in trigger
« Reply #5 on: 12 May 2004, 22:33:03 »
By the way, why isn't the array working, when I define it in Init.sqs and just add the tanks to it in their init lines?

nope - init.sqs will be executed after any unit's init field.

You could still do it using that technique, without init.sqs.

Init fields of units will become executed in the same order as when they were placed in the editor. This means: use the init field of the very first unit which you have placed in your mission
to initialize the empty array and then you can add each unit you want to that array by their own init fields.

hope this helps

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Uldics

  • Guest
Re:Empty vehicles in trigger
« Reply #6 on: 12 May 2004, 22:40:22 »
Thanks! Nice to know all those small things.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Empty vehicles in trigger
« Reply #7 on: 12 May 2004, 23:06:31 »
Thanks! Nice to know all those small things.

lol - i know what ya mean - this can be a pain hehe

Took me almost 3 years now - and believe me there's always
something new to learn.

singleplayer = alot of small things

multiplayer = alot of small things³

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Unnamed

  • Guest
Re:Empty vehicles in trigger
« Reply #8 on: 13 May 2004, 08:42:34 »
If you want to do it via Init.sqs and you know exactly how many you will have at the start of the mission, just name them Vehicle01,Vehicle02 e.t.c

Then in Init.sqs just have:

Code: [Select]
MyEmpties=[Vehicle01,Vehicle02,Vehicle03]