• 0

    posted a message on Help using Unit Type arrays

    @Mille25: Go

    Ah I figured it out. It was running an earlier version with a local variable rather than the Triggering Unit. Thanks again.

    Posted in: Triggers
  • 0

    posted a message on Help using Unit Type arrays

    @Mille25: Go

    That did it! Thanks! But that leaves me with a new question. The triggering event is 'Any Unit dies'. Why would that leave the Triggering Unit as null? Shouldn't it be the dying unit? Thanks again.

    Posted in: Triggers
  • 0

    posted a message on Help using Unit Type arrays

    I'm just getting into mapmaking, but I do have a programming background. I'm attempting to use a Unit Type array to create different units: indices in the array are populated with different Unit Types, so other triggers can easily create units with integers that correspond to the desired index.

    I've made sure that the array and any local variables are being initialized correctly, and that the integers are what I want them to be (so nothing like out-of-bounds indexing is happening), but things still aren't working. Is there a reason why the following line wouldn't work?

    Create 1 CreatureTable[CreatureNumber][1] for player 1 at (Position of (Triggering unit)) using default facing
    

    CreatureTable is a global 2x2 Unit Type array, and CreatureNumber is a local integer assigned earlier in the code. Like I said, I've made sure that the array is properly populated, and that other variables seem correct. Any help would be greatly appreciated.

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