• 0

    posted a message on I need to get the model of a unit.

    I would think its simple enough but I'm having issues converting a unit into its base model. I would think it could be done from a catalog field get but I cant seem to get the conversion right I just keep getting a not found.

    Set Variable
        Variable: Model
        Value: Catalog Field Value Get
            Catalog: Models
            Entry: Convert Game Link To String
                Value: Unit Type Of Unit
                    Unit: Unit
            Field Path: "Model"
            Player: Any Player
    

    I know I'm futzing something up, too tired right now to figure it out. But perhaps I'm barking up the wrong tree?

    edit: I'm pretty sure it has something to do with not using the unit type of unit and using the actor instead but again I'm too tired right now so I'll put this up here and try it tomorrow.

    Posted in: Triggers
  • 0

    posted a message on Formatting Text (and images in text)

    So I know how to add and size images in text, but is there a way to color those images?

    Like <img path="icon\misc\cbf.dds" width="24"/> can I add some kind of color option to this?

    Posted in: Triggers
  • 0

    posted a message on Epidemic ORPG

    @LinkD: Go

    Fair enough, I tried it as well and it simply crashed my sc2 lol.

    Posted in: Project Workplace
  • 0

    posted a message on Epidemic ORPG
    Quote from LinkD: Go

    This is all I do to create the portrait, (only way to get this working was to recreate it everytime your character switches).

    What about using send actor message ModelSwap to the portrait?

    Posted in: Project Workplace
  • 0

    posted a message on Epidemic ORPG
    Quote from LinkD: Go

    @Vermore: Go I used the portrait system to create that effect, I can post the exact action definition I used if you want.

    Please do I've been trying to get that to work for months off and on. I personally would be very grateful if you did.

    Posted in: Project Workplace
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only

    So with this could we create a method to hide all the actors in a "zone" in a first person map to improve frame rates? Or would the cost of hiding them all not be efficient?

    Posted in: Tutorials
  • 0

    posted a message on Math Fail (Part II)

    @Moooyaah: Go

    Exactly what I wanted thank you.

    Posted in: Triggers
  • 0

    posted a message on Math Fail (Part II)

    Okay so, last time I had a math fail I came here and asked and was given an answer and told that excel solver was likely used to solve it. But I cant for the life of me figure it out and I'm too tired to really spend 3 hours trying for something this simple. I need a formula to get these numbers can anyone please help me out real quick with this?

    Input   Output  Difference
    0.00	20.00	0.00
    10.00	14.75	5.25
    20.00	10.88	9.12
    30.00	8.02	11.98
    40.00	5.91	14.09
    50.00	4.36	15.64
    60.00	3.22	16.78
    70.00	2.37	17.63
    80.00	1.75	18.25
    90.00	1.29	18.71
    100.00	0.95	19.05
    

    Edit: fixed numbers.

    Edit2: I know its going to be something like =20-(input*x) or something :X

    Edit3: the origin of the output numbers is val = prev val - prev val * 0.03 but i only show every 10 vals here.

    edit4: I HATE MATH! But it seems as though the formula starts with 20-(input*.6) but by input of 100 the .6 is .1904895

    Posted in: Triggers
  • 0

    posted a message on Parameter Allow Multiple

    @s3rius: Go

    I know this is something of a necro but since I didn't see this anywhere else. My experience with it recently seems to point to using custom script. using #PARAM(var, " stuff ") with var being the allow multiple and the " stuff " being what you want to put in between it. It works the same as #SUBFUNCS(var, "stuff") after the comma anything in the quotes gets put as an in-between of each variable which will show as exactly what you put into it.

    So for me I used a string and put just a single space in between the quotes and it would return my string as whatever the inputs were with a space in between.

    IE:

    "#PARAM(s, ",")" (with the quotes around the param part)

    With s being say an integer with allow multiple and the input values of say 1 2 3 4 5 would result in this string: "1,2,3,4,5" in the script itself after the gui stuff has been removed, note that if you didn't put the quotes around the #PARAM() the result would be 1,2,3,4,5 which would probably give you an error.

    One note is you cant put quotes in between the quotes IE "#PARAM(s, ""something"") would not put a "something" in between each var not that it really matters though.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Working with "Allow Multiple"

    I would like to know if it's possible to make default function in an allow multiple function?

    Basically I have a custom function that returns a string by combining multiple strings with presets over the top so it basically looks nicer.

    IE:

    [Abilities] Spell Effects
        Options: Function, Operator
        Return Type: String
        Parameters
            Effect <String+>
        Grammar Text: Effects(Effect)
        Hint Text: (None)
        Custom Script Code:  "#PARAM(v, " ")"
    

    The effect I want to default every time I add a new one to:

    [Abilities] Effect
        Options: Function, Operator
        Return Type: String
        Parameters
            Effect Action = Deal/Heal/Shield Damage (%) <[Abilities] Effect Actions>
            Effect Data = 0 <Integer>
        Grammar Text: Effect Type Effect Data
        Hint Text: (None)
        Custom Script Code: #PARAM(a) #PARAM(d)
    

    The result of this is something like this:

        Impact Effects: [Abilities] Spell Effects
            Effect <String+>
                Effect: [Abilities] Effect
                    Effect Action: Deal/Heal/Shield Damage (%)
                    Effect Data: 120
                Effect: [Abilities] Effect
                    Effect Action: Cast Spell
                    Effect Data: 4019
                Effect: [Abilities] Effect
                    Effect Action: Apply Status Effect
                    Effect Data: 1526
    

    With the result in the actual script being: "DP 120 CS 4019 AS 1526"

    Again, the problem I am having is the "Effect <String+>" portion always defaults to a blank string. I want it to default to the [Abilities] Effect function instead. If I set this function as the default it shows up as "Effect = (Deal/Heal/Shield Damage (%) 0) <String+>" but the "default" effect is in black and cant be changed and it still defaults to a blank string.

    This is more a quality of life deal as I have to just select the effect function but I do have to scroll through a list for it. And yes I know it seems like a lot of work for the end result to be "DP 120 CS 4019 AS 1526" but visually it looks better and is easier (for me at least) to build spells this way as I tend to typo a lot when writing out scripts "by hand".

    Posted in: Triggers
  • 0

    posted a message on Converting a string directly into an action possible?

    Also I would like to know if it's possible to make default function in an allow multiple function?

    Basically I have a custom function that returns a string by combining multiple strings with presets over the top so it basically looks nicer.

    IE:

    [Abilities] Spell Effects
        Options: Function, Operator
        Return Type: String
        Parameters
            Effect <String+>
        Grammar Text: Effects(Effect)
        Hint Text: (None)
        Custom Script Code:  "#PARAM(v, " ")"
    


    The effect I want to default every time I add a new one to:

    [Abilities] Effect
        Options: Function, Operator
        Return Type: String
        Parameters
            Effect Action = Deal/Heal/Shield Damage (%) <[Abilities] Effect Actions>
            Effect Data = 0 <Integer>
        Grammar Text: Effect Type Effect Data
        Hint Text: (None)
        Custom Script Code: #PARAM(a) #PARAM(d)
    


    The result of this is something like this:

        Impact Effects: [Abilities] Spell Effects
            Effect <String+>
                Effect: [Abilities] Effect
                    Effect Action: Deal/Heal/Shield Damage (%)
                    Effect Data: 120
                Effect: [Abilities] Effect
                    Effect Action: Cast Spell
                    Effect Data: 4019
                Effect: [Abilities] Effect
                    Effect Action: Apply Status Effect
                    Effect Data: 1526
    


    With the result in the actual script being:
    "DP 1 CS 4019 AS 1526"

    Again, the problem I am having is the "Effect <String+>" portion always defaults to a blank string. I want it to default to the [Abilities] Effect function instead. If i set this function as the default it shows up as "Effect = (Deal/Heal/Shield Damage (%) 0) <String+>" but the default effect is in black and cant be changed and it still defaults to a blank string.

    This is more a quality of life deal as I have to just select the effect function but i do have to scroll through a list for it. And yes I know it seems like a lot of work for the end result to be "DP 1 CS 4019 AS 1526" but visually it looks better and is easier (for me at least) to build spells this way as I tend to typo a lot when writing out scripts "by hand".

    edit: I know this probably doesn't belong in this section but I figured I'd add it here.
    edit2: I just remade this as a post in the triggers section since my guess is it's more appropriate there.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Converting a string directly into an action possible?

    @MotiveMe: Go

    Dang, I'm not sure how I could honestly do that without passing it values, with how I want it to work at least these actions will be called too often to allow it to read from a global value.

    Like I have to pass it the players ID# and the ID# of the target :(

    On a side note I want to execute actions I have pre-defined but use a variable in the NAME as opposed to a parameter. Does that change anything? Maybe I am misreading the explanations given though.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Converting a string directly into an action possible?

    So I have this method I'm using to make my spells do what I want them to do which is basically using a string and reading the "words" from it to determine the actions of the spell.

    IE: "DS 100 CS 4019 CA 1111" should be

    "DS"- Deal Spell Damage (100)

    "CS"- Cast Spell ID(4019)

    and the last part is "CA"- Custom Action 1111

    Now what I want to do is convert the 1111 directly into a call(or function? i dunno...) filling in the 2 data points like gf_ca_1111(source, target)

    Is there a way to do this without making a custom action to associate each string value with the custom action?

    As another way of looking at it I want to convert the string value "1111" into something like:

    gf_ca_"string value"(source, target).

    I really want to make it a separate action for each "Custom Action" call and not one universal with a massive if then else or switch (seeing as how switches just seem to be more complicated if then elses anyways)

    Posted in: Galaxy Scripting
  • 0

    posted a message on So, I've hit a limit in script size.

    I have a new question is it possible to retrieve strings from a catalog entry? Like could I store a string in a tooltip for a random button I create and retrieve it as a string? Or is this another one of those text only things?

    Posted in: Galaxy Scripting
  • 0

    posted a message on So, I've hit a limit in script size.

    I may just simplify my descriptions like instead of "Increases the %C's strength by %R1/2/3/4/5/%", just use "Strength +%R1/2/3/4/5/%" I don't have to mention the class of the character etc, it just looks nicer having longer descriptions imo.

    Edit: So this is how I decided to define trait tree:

    1 15 4020 1003 1005 1001 2003 2001 2005 2016 3002 5001 5002 5003 3001 4001 4002 4003

    First number is class identifier second is count of traits and then its the actual traits, it actually cuts down a HUGE amount of script code. Thanks to everyone who responded I think I'll try to use this plus some of the other things to cut down my script size and hopefully be able to get an alpha of my map(s) going soon.

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