• 0

    posted a message on Dialog item (image > change image)

    And that is precisely why I am using an Action definition that sums up those actions you just named into 1 action which I can use to create a dialog item within a panel.

    What the action definition does is takes parameters (Panel,Width,Height, Anchor, Offset X, Offset Y, Image, Image Type and does all the setting on it's own, isntead of me having to do them every time i create an image.

    The image itself works, it is there, formatted as it should be, everything is fine, i just cannot change it, and i get an error when the game starts.

    Posted in: Triggers
  • 0

    posted a message on Creating a Class/Struct in the Editor?

    Thanks for clarifying willuwontu. rtschutter briefed me about a LOT of things and many confusing things were solved.

    Posted in: Triggers
  • 0

    posted a message on Dialog item (image > change image)

    Huh, I ran into a roadbump while working on my map, here goes the code:

    Variables used:

    • temp_Panel is a panel dialog item within which an image item will be created
    • ImagePlayerCardPanel is a variable type Image
    • ImageEnemyCardPanel is a variable type Image (different then the one above)
    • FieldCards[][].Image is a record variable array where .Image is a dialog item

    What follows is an Action Definition for creating a Dialog Item within a panel and adding values to it

           Constructs an item of type (Image) within a panel (temp_Panel) and with dimensions (50, 50) anchored to (Center) with an offset of (0, 0). Sets the text to ("") and color to ((100%, 100%, 100%)) with transparency (0.0). Sets the image (ImagePlayerCardPanel), image type (Border) and hover image (No File) and makes the item clickable (False) and enabled (Enable)
            Variable - Set FieldCards[1][Record_Array_Place].Image = (Last created dialog item)
    

    And afterwards a code that is trying to change the image file

            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Number > 10 (will be true)
                Then
                    Dialog - Set FieldCards[1][Number].Image image to ImageEnemyCardPanel for (Player group(1))
    

    Okay so here are the issues I've been having:

    Two issues arouse from the following code:

    1. The editor gives an error message that says: "Scri: [TriggerControlButtonTemplate] does not have a valid width." If i change the Image Type of the image dialog item from Border to None, the error will not appear (but in this case, the image won't work like it should)

    2. The image does not change, at all. Even if I do this:

            Constructs an item of type (Image) within a panel (temp_Panel) and with dimensions (CardWidth, CardHeigh) anchored to (Center) with an offset of (0, 0). Sets the text to ("") and color to ((100%, 100%, 100%)) with transparency (0.0). Sets the image (ImagePlayerCardPanel), image type (Border) and hover image (No File) and makes the item clickable (False) and enabled (Enable)
            Dialog - Set (Last created dialog item) image to ImageEnemyCardPanel for (Player group(1))
    

    P.S. The dialog item Image does get created, it gets positioned well, sized well, anchored well.... only thing that does not work is changing the picture and the issue #1.

    Posted in: Triggers
  • 0

    posted a message on Anyone still care?

    This would be flippin AWESOME!

    Posted in: Galaxy Scripting
  • 0

    posted a message on Creating a Class/Struct in the Editor?

    Hello to all you mapsters.

    I've only just recently got enough courage to embark on this thorny road called transiting from WC3 World Editor that was easy and appealing to this monstrosity that even though powerful scares the living s*it out of me.... Since the data editor is so scary I decided to skip that part completly and instead make a card game sort of map, to get familiar with the new and powerful dialog-UI system, and for a card game, structures or classes would be freaking wonderful.

    Is it possible to make a class or a structure within this editor? I find it terribly confusing creating any sort of "custom" data within the editor itself. I liked how you could click the little thingy above all triggers in World Editor and put your "pre-initialization" code in there, is there an option similar to this now? If those can be made then tossing out cards is as easy as giving the "place card" function couple of parameters (one of which is a structure containing all the card data) and GG i win, however I haven't been able to do so :(

    Any help is appreciated, still very, VERY new to Galaxy and not extremely proficient with programming either, though i do know more then an average person.

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