• 0

    posted a message on Variable equal returning from the function

    @Kueken531: Go Thank you very much! Now i see how to use this feature.

    Posted in: Triggers
  • 0

    posted a message on Variable equal returning from the function

    Let your Accumulating function return the level or use global variables:
    [code=perl]
    int Accumulating (...){
    return level
    }
    level = Accumulating(p,level);

    I haven't English galaxy version, so GUI scripts wouldn't be understandable.
    Could you explain, how can I do this operation using GUI?

    Posted in: Triggers
  • 0

    posted a message on Variable equal returning from the function

    void gf_Waterspells (int lp_p, point lp_target) {
    Variable Declarations
    fixed lv_power;
    int lv_level;

    Variable Initialization
    lv_power = 0.0;
    lv_level = 0;

    Implementation
    if ((gv_elementType[lp_p][1] == "fire") && (gv_elementType[lp_p][2] == "fire")) {
    }
    else if ((gv_elementType[lp_p][1] == "wind") && (gv_elementType[lp_p][2] == "wind")) {
    }
    else if ((gv_elementType[lp_p][1] == "water") && (gv_elementType[lp_p][2] == "water")) {
    lv_power = 50.0;
    gv_statement[lp_p] = "accumulating";
    gf_Accumulating(lp_p, lv_level);
    gf_Clap(lp_p, lv_power, lv_level, 2.0);
    }
    }

    In this trigger I call gf_Accumulating, that proceed with lv_level parameter.

    void gf_Accumulating (int lp_p, int lp_level) {
    Variable Declarations
    int lv_loopA;

    Variable Initialization
    lv_loopA = 0;

    Implementation
    UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/1539CCF2"));

    lp_level = 5;
    }

    Then i assign lp_level, and wish to return this parameter from function "Accumulating" to use it in other function "gf_Clap"
    But level equal = 0, although i assign 5 in "Accumulating" function.

    PS - Sorry for my poor English.

    Posted in: Triggers
  • 0

    posted a message on Variable equal returning from the function

    Guys, i can't catch how can i return variable equal from the function? I call function in the trigger thats process with parameter, but this parameter always returns equaling "0"

    Posted in: Triggers
  • 0

    posted a message on Function excpectation

    Thanks! But i wanted use Function to avoid globals. Now I don't see any reason to not run external triggers (with globals).

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function excpectation

    Guys, i have script:

    Cycle - take group of units:

    Run Function (...)

    End Cycle

    Code after....

    Function(...) process takes about 5 seconds and make actions with one unit from the group. So it's problem for me run "code after" until Function ends proceed with all unit from the group.

    Is there any good decisions to avoid Function(...) expectation? (i don't want use trigger and global variables instead function)

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