• 0

    posted a message on Unit group variable problems.

    Ok, I solved it by adding a condition in "Marine Movement", checking if the triggering unit is in the right unit group. Redundant, but it solved it. I guess the event only checked for a particular unit type.

    Posted in: Triggers
  • 0

    posted a message on Unit group variable problems.

    Hiya.

    Picture: URL=http://img90.imageshack.us/i/unitgroupmystery.jpg/][IMG]http://img90.imageshack.us/img90/7404/unitgroupmystery.jpg[/IMG][/URL]

    I got a problem that I just can't manage to solve. I made a trigger that works so when I create a certain unit it spawns 2 more of it and they are all put in the same unit group, <Squad [x]>. In addition it also spawns a dummy that is used later, the dummy is placed in unit group: <Squad Dummy [x]>. The x is based on a variable that increases by 1 every time a unit is trained (not created). This can by seen in picture 1.

    Picture 2 & 3 shows the triggers for selecting one of the marines will make the corresponding dummy to be selected instead. They work flawless.

    Picture 4 & 5 shows the triggers for moving the squads, when I move the dummy the right squad should follow. These however does NOT work as they should. It works aslong as I only got one squad out, but if I make more all the marines will follow any of the dummys.

    I really don't understand why the selecting part works, but the rest doesn't. Can anyone please take a look and see if you can help out?

    The sixth picture show how I set up the array in the unit group variable. I pretty much took a shot in the dark there as I had no clue how it worked. I got an idea now after playing around with it, but an explanation or simply a link to a guide would be awesome!

    Thank you.

    Posted in: Triggers
  • To post a comment, please or register a new account.