• 0

    posted a message on [Trigger\Function] Problem with calling a function

    @s3rius: Go

    I actually tried to add ; and it didnt work.

    But goddamn. I knew there was an easier option the custom script. I can actually choose the function "DetermineVType" now from "function". Working now. Thanks!

    Posted in: Triggers
  • 0

    posted a message on [Trigger\Function] Problem with calling a function

    @BasharTeg: Go

    I had a problem there in the function, you're right, but I already fixed it. instead of that long line I gave it single values, so it should be 13 now instead of a boolean, but that's not the case.

    @s3rius: Go

    the lv_random is a local variable called "Random" in the "spawn wave" trigger. same goes for lv_unit. I use "custom script" cause I know no other way to call a function from set variable, isnt it has to be custom script?

    Posted in: Triggers
  • 0

    posted a message on [Trigger\Function] Problem with calling a function
    Spawn Wave 0
        Events
        Local Variables
            Functemp = false <Boolean>
            Temp1 = 0 <Integer>
            Random = 0 <Integer>
            Unit = No Unit <Unit>
        Conditions
        Actions
            Variable - Set Random = (Random integer between 1 and 12)
            Debug - Display ("Wave " + (Text(1))) as debug output using Type 1, and Do display it in the game window
            General - For each integer Temp1 from 1 to 30 with increment 1, do (Actions)
                Actions
                    Unit - Create 1 DtPckt for player 14 at (Random point in Spawn1) facing (Random point in Mainframe1) (No Options)
                    Variable - Set Random = (Random integer between 1 and 20)
                    Unit - Set (Last created unit) custom value 0 to (Real(Random))
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Random > 12
                        Then
                            Variable - Set Functemp = DetermineVType(lv_random, lv_unit)           <-----------------------------
                        Else
                    Unit - Order (Last created unit) to ( Move targeting (Center of Mainframe1)) (Replace Existing Orders)
                    General - Wait 2.0 Game Time seconds
    
    Posted in: Triggers
  • 0

    posted a message on [Trigger\Function] Problem with calling a function

    @Kueken531: Go

    No no, it's a unit, not a unit type. I ment the variable's type = unit. :P Sorry about the slight confusion, but that's not the problem.

    Posted in: Triggers
  • 0

    posted a message on [Trigger\Function] Problem with calling a function

    @Kueken531: Go

    The function itself should work fine. The problem is the "call function":

    Variable - Set Functemp = DetermineVType(lv_random, lv_unit)
    

    When I disable this action, I get no syntax error and everything compiles.

    Posted in: Triggers
  • 0

    posted a message on [Trigger\Function] Problem with calling a function

    This is the DetermineVType function:

    DetermineVType
        Options: Function
        Return Type: Boolean
        Parameters
            VType = 0 <Integer>
            VUnit = No Unit <Unit>
        Grammar Text: DetermineVType(VType, VUnit)
        Hint Text: (None)
        Custom Script Code
        Local Variables
            UnitLife = 0.0 <Real>
            UnitShield = 0.0 <Real>
        Actions
            Variable - Set UnitLife = (VUnit Life (Default))
            Variable - Set UnitShield = (VUnit Shields (Default))
            General - Switch (Actions) depending on VType
                Cases
                    General - If ((Convert Boolean To Integer(((VType >= 61) And (VType <= 65)))))
                        Actions
                            ------- It's A Regular V
                            Variable - Set UnitLife = (UnitLife * (2.0 * (Real(Wave))))
                            Variable - Set UnitShield = (UnitShield * (2.0 * (Real(Wave))))
                            Unit - Set VUnit Life to UnitLife
                            Unit - Set VUnit Shields to UnitShield
                            General - Return true
                Default
                    General - Return false
    
    Posted in: Triggers
  • 0

    posted a message on [Trigger\Function] Problem with calling a function

    So, I'm having some problems with functions, and I really don't know why.

    I get syntax error on the following line:

     Variable - Set Functemp = DetermineVType(lv_random, lv_unit)
    

    where lv_random is a local variable of integer type named Random, same goes for lv_unit (unit). functemp is boolean and the DetermineVType returns Boolean value. I have NO idea what's wrong with the syntax.

    Note - It doesnt matter where I place the function "DetermineVType", it's still gives me this error.

    Please help, For like the past 2 hours I'm banging my head on this issue. I've also tried to search the forums for similar problems without success. Thanks.

    Posted in: Triggers
  • 0

    posted a message on [Solved] [Behaviors \ Validators \ Requirements] Behavior Requires Behavior problem.

    @Kueken531: Go

    OHHHHH. So it might have worked just fine. :P I'm not really sure if I checked it and it wasnt working or anything, but I def treated it as not working cause I saw the status icon (which I didnt know still appear if u deactivate).

    Thanks once again!

    Posted in: Data
  • 0

    posted a message on [Solved] [Behaviors \ Validators \ Requirements] Behavior Requires Behavior problem.
    Quote from Kueken531: Go

    @BeerDuke: Go

    You can get rid of it, if you use a requirement, and use both the "Use" and the "Show" part of the requirement.

    YOU'RE THE MAN! That's solved the issue!

    Quote from DrSuperEvil: Go

    Could you please give some details as to your validator's settings?

    Although the problem is solved, I still want to know why my validator didnt work: Validator - Unit Behavior Compare Count Compare - Less than Value - 1

    Other settings are default (I'm pretty sure they're irrelevant). do note I've tried to play with these settings and with compare and value to different stuff just to see how it reacts - nothing.

    Posted in: Data
  • 0

    posted a message on [Solved] [Behaviors \ Validators \ Requirements] Behavior Requires Behavior problem.

    The behavior is always on. Should I've done something else? if I have a timer on it, it never goes back on after it's disabled. And I dont see how I "re-enable" it after it's ending period.

    Posted in: Data
  • 0

    posted a message on [Solved] [Behaviors \ Validators \ Requirements] Behavior Requires Behavior problem.

    So, as the title says, I have behavior that suppose to work only when another behavior (given by a unit aura) is achieved by it. And I can't seem to make it work, what i've done so far:

    The behavior that suppose to work is found at the unit behavior panel. I've created a validator that checks "unit compare behavior count" to the behavior given by the the other unit's aura. and I've placed that validator with the Validator (disable) option on the first behavior.

    In theory it's suppose to work, but it doesnt. The unit seems to always have the behavior on.

    I even tried to play a bit with requirements, to put a "countbehavior" requirement with the appropriate behavior on it, and it doesnt work as well.

    Any help would be appreciated, thanks!

    Posted in: Data
  • 0

    posted a message on Last-Attacker trigger bugged?

    I havent changed anything in the code actually that made it stopped working. that's why I think it might be bugged. Also I've done as Blizzard instructed by addressing the units.

    Anyway, I've "solved" the problem by using "Unit is attacked" event then I used the "Attacking unit == xxxxxxx" rather then "Last attacker == xxxxxxx".

    Thanks guys!

    Posted in: Triggers
  • 0

    posted a message on Last-Attacker trigger bugged?

    Hey guys,

    So I've been using the "last attacker of triggering unit" as a condition check when units changes it life status. All was nice and dandy, but then, out of the blue, the script stopped working.

    I've tried stuff like "display name of last attacker", tried also similar script on a different unit - still not working. it's like it doesnt identify the attacking unit. I even tried "display name of owner of attacking unit", simply doesnt recognize anything.

    is there anyway to check what's wrong here? maybe to use galaxy script instead?

    Thanks in advance.

    Posted in: Triggers
  • 0

    posted a message on [Solved!][Effect \ Validators] Help with Weapon Upgrades & Consumable Energy

    Hey everyone,

    So I've created a weapon set that drain 8 energy with each attack using a validator and modify unit effect. The problem goes when I add upgrades to the weapon and I want the weapon to consume more energy. I have no idea how even how to approach solving this problem.

    so right now I have a weapon (set), and weapon (damage), a modify_unit effect that consumes energy with each shot, and a validator that doesnt allow the unit to attack if it doesnt have enough energy. How do I make those changes with the upgrades?

    Thanks a lot in advance!

    Posted in: Data
  • 0

    posted a message on A map above the clouds

    I'm facing the same issue as zeldarules28, When I'm creating the map all is fine. sometime later, when I come back to edit, till a certain point everything is good, suddenly, whenever I change the terrain, the fog becomes black squares. It might be something I've done in the Lightning manager, but I'm not certain.

    Anyone know how to fix this problem?

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