Home   Help Search Login Register  

Author Topic: global var = list triggername  (Read 1165 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
global var = list triggername
« on: 24 Oct 2006, 01:30:29 »
A curiosity, if you assign to a global variable the list of a trigger, this variable seems to keep updated (without your intervention) all the time with the current list of the trigger, seems to work like a pointer  :blink:

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: global var = list triggername
« Reply #1 on: 24 Oct 2006, 10:26:56 »
indeed. and if you assign

Quote
global var = +thislist

in the init of the trigger, it stays at the initial value.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re: global var = list triggername
« Reply #2 on: 24 Oct 2006, 10:44:00 »
Same what bedges says happens when making:

a = list triggerA; deleteVehicle triggerA

When a unit of the static list gets killed, it will be like any other array e.g: west alpha black 25cblabla #noid mc vojak

While when not doing it like bedges or deleting the trigger, a will interact with the trigger's list and the
unit gets removed correctly from the array.

I think this is still a good find Mandoble, since lots of missions are based on trigger lists made like you mentioned
in first post and thus there may be different results because of the interactive global variable.

:edit - if you want to assign a trigger's list to a non interactive global variable, where the units will reamin
without the #noid stuff, you need to say:

a = call format [{"%1"},list triggerA]

Now killing a unit from this trigger's list will not change anything - the array will remain like it was from start.  ;)

~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