• 0

    posted a message on Any ideas on vertical/reversed progress bar?

    I'm trying to create a progress bar filled from right to left or bottom up. I've tried set dialog item rotation but that didn't work for a progress bar item.

    Anyone has any idea on how to make it? or is it possible in galaxy at all?

    Posted in: Triggers
  • 0

    posted a message on Are Presets accessible in custom galaxy scripts?

    <<quote 1817902>>
    Lemme google that for you:

    http://www.sc2mapster.com/forums/?scope=treesearch=structref http://www.sc2mapster.com/forums/?scope=treesearch=arrayref

    In any case, while there are a few notable exceptions, for the most part you dont need elaborate constructs for actually getting shit done. What do you intend to do that cant be solved in any other way?
    <</quote>>

    Thanks a lot for the links, much appreciated.

    A bit more to language capability problem. Theoretically you can use your nails to scratch trees and eventually build a house. Keep in mind that even ForTran is a Turing complete language that 'capable' of everything, as a language of year 2012 galaxy script really lack of many features to enable project of significant complexity. To have 'work around' on certain task is nothing to be proud of as compiler programmer, this kind of credit should be entitled to user. Just like template meta programming of C++ is really not a language feature, but a lack of reflection abilities of the language itself.

    Posted in: General Chat
  • 0

    posted a message on My trigger action's being run repeatedly, need some explanation or recommended readings
    Quote from Ahli634: Go

    Specify a stage in the event. "Generic3 - Execute" might be a good one.

    That solved it very well, thanks.

    I was suspecting about this 'stage' thing as well, but couldn't come up with an logical explanation to myself. I interpret 'generic 1 - any' intuitively as 'run ability once no matter what stage it was triggered'.

    Do you know any reading that explain ability stage well?

    Posted in: Triggers
  • 0

    posted a message on My trigger action's being run repeatedly, need some explanation or recommended readings

    I have a trigger handling 'unit uses ability' event and run some custom code once triggered.

    What I found and confused about is that the code actually ran 8 times per triggering. I feel that there're must be something basic about triggering that I didn't know about.

    What I know is there're actions to turn on/off a specific trigger, but what exactly is the triggering mechanism? why it's exactly 8 times of this specific triggering event?

    Posted in: Triggers
  • 0

    posted a message on Are Presets accessible in custom galaxy scripts?

    @Alevice: Go

    can you please elaborate a bit about arrayref and structref?

    I feel it's really hard to construct data structure with some level of complication with galaxy script.

    Posted in: General Chat
  • 0

    posted a message on Are Presets accessible in custom galaxy scripts?
    Quote from SoulTaker916: Go

    AHAH! i should have asked you jade what you CANT do with galaxy!

    Jade answered my question very clearly. What I learnt in past 3 weeks of my map making life, I would say you can't do $$$$ with galaxy script. The only model of programming in galaxy is to pre-allocate your data then write global functions to manipulate them. You cant even define any custom type or use pointer (I heard they once support the use of pointer but removed it later on). Blizzard should totally fire the one designed galaxy compiler, this is high school level work of making a language.

    Posted in: General Chat
  • 0

    posted a message on Are Presets accessible in custom galaxy scripts?

    @Alevice: Go

    Thanks a lot for your solution.

    I wanted 'enum' mostly for code readability reasons, while your solution seems having some trade offs. I need to use irrelevant function names to get this hash-like behavior. I need to think about it carefully before i make my choice.

    Posted in: General Chat
  • 0

    posted a message on Are Presets accessible in custom galaxy scripts?

    I have some custom scripts within the "custom script" section of a trigger/function. To keep the code clean I need some kind of enum to keep track of int based constants. However when i press ctrl+f11 there's no code of preset definition showing anywhere. Is it possible to use presets within my custom scripts? or is there any language feature can be used like enum?

    I'm currently using constants but they're not working as well as enum solution that every programmer got used to.

    Posted in: General Chat
  • 0

    posted a message on Need help on galaxy scripting and more general problems

    @gerudobombshell: Go

    Thank you very much for all the tips. What i find out so far is that Blizzard seems not disclosing any of their IP, including all source code of basic type definitions. Therefore I simply can not manipulate an existing type, such as a Point or Region, in my own custom script. I actually end up using the Point to Region function in my script, where I had to loop through all the regions I've got each time (YAK >_<). I think i'll just stick to this no-so-elegant solution for now, just feeling kinda stupid for not able to play with more basic types in my code.

    For the third question, what I had in mind was actually a visual effect in specific region, that last until certain condition changed. I think SoulFilcher pretty much answered about it. I'm using doodads as the placeholder for now, by hiding all during init and show/hide those in certain region when condition's met.

    Again, much appreciated for your time and tips :)

    Posted in: Galaxy Scripting
  • 0

    posted a message on Need help on galaxy scripting and more general problems
    Quote from Zolden: Go

    @miushock: Go

    Ok, than you can preplace a unit with the model you want to appear, put it in the center of the area. Its actor should have

    Actor creation Set Opacity 0

    event to be initially invisible. Than, each of the spells you want to unveil that unit, should have a search area effect with a radius, that would guarantee that it will have that central unit of the area, no matter what part of the area the effect will happen at. That search effect would apply a behavior to the unit. And to make the unit appear when while it have the behavior, you put these in its actor:

    Behavior.name.on Set Opacity 1

    Behavior.name.off Set Opacity 0

    So, when someone casts something in the area, unit get the behavior and switch to visible state. Guess you'd want to put another search -> "remove behavior" before the apply behavior to remove the visibility caused byprevious cost.

    Both, apply and remove behavior effects could have a validator to affect only that invisible unit.

    I keep suggesting data ways to do what you want, because data reacts faster, consumes less perfomance, looks more elegant, faster to implement and easier to modify.

    thank you so much for you suggestions, i'll definitely give it a try then compare with trigger way. Presumably I'll need to set the unit unselectable, with no collision size etc, to make it truly look like a terrain morph. Please correct me if I'm wrong.

    Posted in: General Chat
  • 0

    posted a message on Need help on galaxy scripting and more general problems
    Quote from Zolden: Go

    I would simply create actor in effect's point. Spell's effects could include destroy persistent and create persistent, so next cast would remove the previous persistent in the area, and thus - the actor.

    To configure actor to be created at efect, you need to have something like these events:

    effect.effect_name.start term: at: effect create

    effect.effect_name.end destroy

    and host site operations must be SOpAttachTargetPoint

    Your solution is very inspiring and enlightening to me. However I need the persistent visual effect take place in specific area, not under cursor. For example, assume I have a predefined square of 1,1 - 3,3, I'd like the visual always cover this fixed region for any cast fall into the region. Thus I think I still need some kind of modification on effect target point.

    Posted in: General Chat
  • 0

    posted a message on Need help on galaxy scripting and more general problems

    I'm trying to implement a game idea of my own and have decided galaxy editor can be a good prototyping tool for me. However I'm new to galaxy editor and here are some specific and general questions I'd like to ask. let's start from my purpose.

    I'm trying to make an ability that will create some persistent visual effect (will last until overwritten otherwise) on specific region once cast. Hence I ran into many confusions and obstacles in the attempt. The approach I'm taking right now is to create doodads with the visuals i want (lava splash, for example) and hide all of them during initialization, then create a trigger that listens on the specific ability, then show/hide doodads within in the region where the ability was cast.

    Problems are 1. I need to create a custom function that converts Point into Region, where I need some insight on the 'point' struct, how am I suppose to get this info? or more generally, where are all source code of built in functions are kept? 2. I heard there're conditions to judge if a point is within bonds of a specific region, but all I can find under conditions are and/or/if etc. Can anyone tell me more on in regard of this topic? 3. Is it possible to create persist visual on map w/o trigger? "Effect" with custom/other existing model for example?

    Any other suggestions are welcomed, such as alternates that i can achieve my goal

    P.S. I've posted this under the galaxy scripting sub forum, then realized there might be people who do not browse scripting forum but can give me more general advise. Hope this dup pose does not bother anyone.

    Posted in: General Chat
  • 0

    posted a message on Need help on galaxy scripting and more general problems

    I'm trying to implement a game idea of my own and have decided galaxy editor can be a good prototyping tool for me. However I'm new to galaxy editor and here are some specific and general questions I'd like to ask. let's start from my purpose.

    I'm trying to make an ability that will create some persistent visual effect (will last until overwritten otherwise) on specific region once cast. Hence I ran into many confusions and obstacles in the attempt. The approach I'm taking right now is to create doodads with the visuals i want (lava splash, for example) and hide all of them during initialization, then create a trigger that listens on the specific ability, then show/hide doodads within in the region where the ability was cast.

    Problems are 1. I need to create a custom function that converts Point into Region, where I need some insight on the 'point' struct, how am I suppose to get this info? or more generally, where are all source code of built in functions are kept? 2. I heard there're conditions to judge if a point is within bonds of a specific region, but all I can find under conditions are and/or/if etc. Can anyone tell me more on in regard of this topic? 3. Is it possible to create persist visual on map w/o trigger? "Effect" with custom/other existing model for example?

    Any other suggestions are welcomed, such as alternates that i can achieve my goal.

    Posted in: Galaxy Scripting
  • 0

    posted a message on How do I set longer camera distance?

    @Nebuli2: Go

    I tried to add 2 more layers with distance 38/100 and attack angle 60/90 respectively, but didn't seem to have any effect.

    Am I doing anything wrong?

    Edit: I tried to modify existing layer and that worked fine, but till, am I just cant add another layer?

    Edit2: Also, I feel it zooming abit slower than desired, anyway i can change zoom speed?

    Posted in: General Chat
  • 0

    posted a message on How do I set longer camera distance?

    @Nebuli2: Go

    Thx, i think i get the idea of multiple zoom levels now. I always thought the camera zoom in sc2 were continuous, apparently i was wrong XD.

    Will give it a shot tmr, thx alot for helping out.

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