Working with arrays

Discussion in 'Starcraft 2 (SC2) Editor Help' started by krainert, May 25, 2010.

  1. krainert

    krainert Member

    Ratings:
    +10 / 0 / -0
    Greetings,

    How can one pass an array (and not one of its elements) as a value?
    EDIT: Also, how can one work with Records as values in the same way?
    Also, how are "Allow Multiple" checked parameters used?

    EDIT: I fear this might be impossible (which would be ludicrously absurd)... Please prove me wrong.

    Thanks.
     
  2. gex

    gex New Member

    Ratings:
    +6 / 0 / -0
    it is impossible.

    You can use Andromeda ;) and create a class which has an array as member. This class can be passed from / to functions.
     
  3. krainert

    krainert Member

    Ratings:
    +10 / 0 / -0
    *ranting*

    Damn, Andromeda looks NEAT. I guess I'll be looking into that as soon as I've finished scripting this thing.

    Thanks.
     
  4. rover2341

    rover2341 Is riding a roller coaster...Wee!

    Ratings:
    +114 / 0 / -0
    I cant seem to figure out how to do that. Even thought you talk about it in the language spe... section.

    If you could show me a sample of 1 class that has in array of another custom class in it, and it getting initiated. I cant seem to get that to work...

    Code:
    
    
     
  5. Sensang

    Sensang TH.net Regular

    Ratings:
    +7 / 0 / -0
    I might be mistaken, but aren't unit groups and player groups arrays?

    But arrays in general? In the blizzard gui, I think not.
     
  6. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    You could easily "pass arrays" with a 2d array by passing the index of the first "coordinate".

    Passing a record(==struct) as a value was once possible with pointers, but it doesn't seem possible anymore.
    Structs are quite much useless atm anyway. They only serve as a bunch of variables.
     

Share This Page