• 0

    posted a message on what's wrong with the experience field?

    What custom value? Does units have some unused fields which we can use to store some info? I actually just used unit's speed (it's a building, so the speed field is unused) instead of experience, and now it works.

    Posted in: Triggers
  • 0

    posted a message on what's wrong with the experience field?

    I create units in a trigger, and set their experience to a specific numbers. I just want to use experience field as array index to adress created units properties. But it doesn't work. I check the value of experience field after I set it to 1, but it's still 0... Do I miss something? How can I set units experience and it to keep the number?

    Posted in: Triggers
  • 0

    posted a message on Problem with float(real) / int numbers (math problem)

    I never faced this problem, but I can suggest you to use 123.456789 fixed instead of 123456789 int, having in mind that your number is million times less then your actual number.

    Posted in: Triggers
  • 0

    posted a message on how to handle >4 kinds of resources using data editor

    ok, let it be the triggers

    Posted in: Data
  • 0

    posted a message on how to handle >4 kinds of resources using data editor

    There are >4 kinds of resources in my mod. They are stored in global variables. I want to use them as costs of units as usually in data editor, is it possible?

    Posted in: Data
  • 0

    posted a message on global variables and parallel working triggers

    Got it, thanx for explanations.

    Posted in: Galaxy Scripting
  • 0

    posted a message on global variables and parallel working triggers

    What if I don't have a Wait command in my function, but the cycle is large? I's like:

         i = 0;
         while (i < 10000){
              (some code with global variables without wait commands)
              i += 1;
         }
    

    I know for sure that 2 instances of this function will start at the same moment by different players. Will they interfere by some multithread way, or functions without wait commands never interfere?

    Posted in: Galaxy Scripting
  • 0

    posted a message on [solved] how to remove some units from a magazine?
    Quote from TacoManStan: Go

    Making the method's parameters "no negative" is much easier than having to write an entire method to handle the negative number.

    It's true. And it aquits them if they would want to create the editor with minimum efforts. But it seems like they would like to create a perfect editor. And seems like there is no principle restrictions about handling a negative number of ammo modifier value. It's just a question of 10 minutes of code writing. It feels more right when things like this are symmetric, and feels a little incorrect when you can't do opposite thing. So, I understand, why didn't they created the remove thing, but I don't agree with this decision :)

    Posted in: Triggers
  • 0

    posted a message on [solved] how to remove some units from a magazine?
    Quote from TacoManStan: Go

    If the number was able to go into the negatives, then interceptors would just disappear out of thing air. This isn't a problem when they are in the hangar, but it is while they are flying around.

    I still don't see any reason, why didn't blizzard describe the UnitMagazineArm() function to accept negative values. Magaizines are always control their units, no matter where they are, in the sky or in a hangar, because when some magazine units die, the magazine ammo amount reduces. So, there is no problem just to remove some units after receiveing a "remove some units" command. It's my map, I want to decide, can interceptors just disappear in the air or they can not. And I can remove flying interceptors, by picking them when they fly, and there is no problem about. The only problem is [1, N] restriction of the function argument.

    Posted in: Triggers
  • 0

    posted a message on global variables and parallel working triggers

    I have a trigger, which uses a global vaiable. This trigger's action have some cycles, so it need some time to be performed.

    Is it possible, that another instance of the action will start to perform before the first instance ended?

    I just want to know, is it safe to use global variables? I scared about two or more parallell working functions could use the same global variable at the same time. It will cause wrong results of the calculations.

    So, is the situation real? Or functions are always work sequentially, even if the game start alot of them in one moment?

    Posted in: Galaxy Scripting
  • 0

    posted a message on [solved] how to remove some units from a magazine?

    oh yeah, just found a solution

    I simply pick all hidden units in a small radius around the magazine holder, and remove those of them I want to remove from the magazine

    Posted in: Triggers
  • 0

    posted a message on [solved] how to remove some units from a magazine?

    guys?

    I can't believe, it's impossible. It seems so simple. There must be some tricky ways. I can see a couple of ways, but they are a bit complicated comparebly with a simple function. I can, for example, remove the unit, create him again, and fill his magazines again, except the units I was going to remove. Plus, simultaneously save and restore unit's stats. Too much work for the simple operation... So, still i hope someone knows, how to do it easier.

    Posted in: Triggers
  • 0

    posted a message on [solved] how to remove some units from a magazine?

    UnitMagazineArm function doesn't accept negative quantity.

    But I need to set magazine units quantity to zero sometimes. Are there any ways to do it?

    Posted in: Triggers
  • 0

    posted a message on how to extract r, g and b integer values from color variable?

    Cool, thanx.

    Posted in: Triggers
  • 0

    posted a message on how to extract r, g and b integer values from color variable?

    I have a color variable, and I need to extract r, g, b color values to manipulate. Is there any function to extract those?

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