• 0

    posted a message on Galaxy extension

    @Mille25: Go

    Well, I agree that global struct arrays are better when you know exactly how many objects you need to create. I would absolutely use them for something with an obvious fixed amount, like defining a global struct array with one struct for each player, to contain easily accessible properties that you want to associate with them.

    But I personally find it pretty unmanageable when the number of things is large and/or expected to change over development. Like structs representing heroes and items for the construction and running of a hero selection and item shop. It's a pain when every time you add a hero or item you have to go add 1 to the count.

    I also don't think that the slowdown is really worth noting. It's pretty insignificant, as long as your coding is correct. Focusing on reducing the number of checks and runs of triggers is much better. I also find that using the data table makes code a lot more readable and modular. Because you have to define all these getters and setters, the code is just the right amount of verbose for me. I also tend to build any "objects" that use the data table as separate code modules by putting them in separate script "files".

    One downside we haven't mentioned is the inability to store function/array pointers in the data table. This really bums me out, I love function pointers. I once worked in a map where there were chat commands and each command was, in the code, part of a really long if/else if/else if/.../else tree. Horrible way of coding. When I wanted to create my own chat command system I created a global struct array to contain the commands and mapped from the entered message to an index in this array, then invoked a function pointer within the corresponding struct.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy extension

    Edit: This comment is kind of redundant, didn't see the remarks above about the Data Table.

    Classes and dynamically allocated structs/arrays could be achieved by a pre-compiler using the global data table. Any object can be simulated by storing its members in the data table with corresponding keys.

    As an example, consider the following code:

    struct person {
        string name;
    };
    person* createPerson(string name) {
        person* p = malloc(sizeof(struct person));
        p->name = name;
        return p;
    }
    

    This would be compiled to:

    int personCount = 0;
    
    int createPerson(string name) {
        int person = personCount;
        DataTableSetString(true, ("person[" + IntToString(person) + "].name"), name);
        personCount += 1;
        return person;
    }
    

    Any references to members of the struct would also have to be compiled to DataTableGet / DataTableSet methods (or compiler generated getters/setters that invoke DataTableGet / DataTableSet).

    I'm sure you can see how this would be extended to arrays, classes, etc.

    There's really no point to making a compiler to do all this though; just code using DataTable in the first place. It's really not that bad.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Ability Charge Count Issues

    @DrSuperEvil: Go

    A dummy weapon wouldn't help because the map has a custom interface with no use of the original weapon display. Really needs to be on the ability button itself (or perhaps the buff bar).

    Posted in: Data
  • 0

    posted a message on What happened to SotiS?

    @Reul123: Go

    It is now named Aeon of Storms and still under development by the original developer (EKCO) as well as myself and another community member Pride AKA WhaleTits.

    Posted in: Team Recruitment
  • 0

    posted a message on Ability Charge Count Issues

    Hi all,

    I have a targeted ability that deals damage and grants the caster a stack of a behavior if that damage kills the target. I would like to make it display the stack count of this behavior on the button, without having to create a dialog display for it.

    In order to accomplish this I was going to try to use the ability's charge count to display this by adding and removing charges to match the number of stacks of the behavior. I figured that by giving the ability a Charge Count (Use) of 0, the ability could still be casted even if the stack count (and therefore charge count) were 0.

    However, with a Charge Count (Use) of 0, there are some inexplicable issues. Even though I have a Charge Count (Start) of 0, the ability starts with the max number of charges, 5. Attempting to remove charges via trigger does nothing. Setting any value for Charge Time Start or Charge Time Use does nothing as well.

    Does anybody know how to fix these issues and accomplish what I wanted?

    Thanks

    Posted in: Data
  • 0

    posted a message on Unwanted Player (Question and Concern)

    I suppose if you have a map on the popular list they are even less likely to take action.

    Posted in: Off-Topic
  • 0

    posted a message on Ability

    @JohnPhobia: Go

    Ranakastrasz is correct that the untargetable flag will also affect all other abilities.

    What you want to do is have this ability apply a behavior to the unit when it hits that unit. That behavior should have the 5 second duration that you mentioned. Then create a validator on behavior count on target unit, checking that this behavior is equal to 0.

    Finally, find the absolute first effect of your ability, the one that you put directly into the ability data. Put this validator onto that effect. The reason for this is that the game will not even allow you to attempt to cast the ability if the validators on the first effect fail.

    Posted in: Data
  • 0

    posted a message on Banks, highscores, and singleplayer games

    If it's a single player game, there is absolutely no way. If it's multiplayer, you can somewhat achieve this through the idea of a viral bank.

    Basically, whenever a game is started with more than one player, read in the high scores stored in each player's bank. Then loop over all these accumulated high scores, pick the highest scores, and write them to every player's bank.

    So you're out of luck, since you're singleplayer.

    Posted in: Triggers
  • 0

    posted a message on Unwanted Player (Question and Concern)

    What Glorn was trying to say is that this may have all been started by admin abuse in the first place and since you can't provide replays of every game that the guy was ever in you can't prove otherwise.

    Posted in: Off-Topic
  • 0

    posted a message on A few ui changes

    @Sapphire_united: Go

    You can move the position of the mineral readout using either layout files or triggers.

    For an example of layout files, see Layout Snippets. Sorry, I don't have time to just tell you how to do this specific layout.

    The other way, doing it by triggers, you use the "Hookup Dialog Item Standard" trigger action to get the resource panel as a dialog item, and then you can move it using the other dialog item triggers. To do this you have to figure out what the name of the panel is, which you will have to look in the UI Module for. It will be something like "UIContainer/FullscreenUpperContainer/..."

    Posted in: UI Development
  • 0

    posted a message on Unwanted Player (Question and Concern)

    If the lobby is your problem then you're out of luck, because you have no control over lobbies. Just ignore the guy and he'll get bored eventually.

    Posted in: Off-Topic
  • 0

    posted a message on Looking for someone to create custom micro battles

    @microVAST: Go

    So not unlike Starcraft 2's challenges?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Beam Panel

    @Narudek: Go

    Nobody is going to do all of your work for you.

    Posted in: Triggers
  • 0

    posted a message on Tug Dialogs

    @Narudek: Go

    Yes.

    Create a Dialog Item (Image) inside of a Dialog Item (Panel). Anchor the Image to the Left side of the Panel. Make the Image the full size of that frame. Shrink the Panel's width so that it is smaller than the Image, and you will see that the Image gets cut off, revealing only the portion that fits inside the Panel.

    By anchoring the Panel to the Left side of the Dialog, and having it start at a width of 0, you can increase the Panel's width to reveal more of the Image, making it appear as though the Image is moving to the Right (towards Narud).

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