• 0

    posted a message on reading catalog values after they've been changed

    Yes I am

    Posted in: Triggers
  • 0

    posted a message on reading catalog values after they've been changed

    Hey, I have a custom action that reads and changes a bunch of catalogue values.
    It runs once just fine, but the second time it runs, it gives me a "cannot be read" error, and then since im setting it based on its own value, it gets set to 0.

    Is this common, is there a way around it?

    Eldrad initiative function
        Options: Action
        Return Type: (None)
        Parameters
            Hero = No Unit <Unit>
        Grammar Text: Do Eldrad Ulthran initiative functions for Unit
        Hint Text: (None)
        Custom Script Code
        Local Variables
            initiative = (Custom value Initiative of Hero) <Real>
            Base Attack Speed = 1.7 <Real>
            Scry cooldown = 0.0 <Real[6]>
            guide cooldown = 0.0 <Real[6]>
            fortune cooldown = 0.0 <Real[6]>
            doom cooldown = 0.0 <Real[6]>
            path cooldown = 0.0 <Real[6]>
            storm cooldown = 0.0 <Real[6]>
            staff cooldown = 0.0 <Real[6]>
            int = 0 <Integer>
        Actions
            Catalog - Set value of Weapons PsychicDischarge Period for player (Owner of Hero) to (String((Base Attack Speed * (1.0 - (initiative * attack time per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 6 with increment 1, do (Actions)
                Actions
                    Variable - Set Scry cooldown[int] = (Value of Abilities ScryersGaze Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities ScryersGaze Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((Scry cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 5 with increment 1, do (Actions)
                Actions
                    Variable - Set guide cooldown[int] = (Value of Abilities Guide Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities Guide Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((guide cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 5 with increment 1, do (Actions)
                Actions
                    Variable - Set fortune cooldown[int] = (Value of Abilities Fortune Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities Fortune Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((fortune cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 5 with increment 1, do (Actions)
                Actions
                    Variable - Set doom cooldown[int] = (Value of Abilities Doom Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities Doom Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((doom cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 5 with increment 1, do (Actions)
                Actions
                    Variable - Set path cooldown[int] = (Value of Abilities ThePathBeyond Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities ThePathBeyond Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((path cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 5 with increment 1, do (Actions)
                Actions
                    Variable - Set storm cooldown[int] = (Value of Abilities EldritchStorm Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities EldritchStorm Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((storm cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
            General - For each integer int from 0 to 2 with increment 1, do (Actions)
                Actions
                    Variable - Set staff cooldown[int] = (Value of Abilities StaffofUlthamar Cost[int].Cooldown.TimeUse for player (Owner of Hero) as an integer)
                    Catalog - Set value of Abilities StaffofUlthamar Cost[int].Cooldown.TimeUse for player (Owner of Hero) to (String((staff cooldown[int] * (1.0 - (initiative * cdr per init)))) with Any Precision decimal places)
    
    Posted in: Triggers
  • 0

    posted a message on trigger actions firing other trigger events

    I think I figured it out. If the attribute changing fires off the oh trigger that's fine, cause nothing will be changes in the hp trigger (the correct values have been set and it'll register a change of 0) I'll just need to put blocking in there so only one trigger has access to the units hp at one time. (Wait for time actions I think would work)

    Posted in: Triggers
  • 0

    posted a message on Creating a unit and attaching beams

    Excellent : ) I got it working. Now I just need to figure out why the central actor jumps up on the last 2 periods of the persistant

    Posted in: Data
  • 0

    posted a message on trigger actions firing other trigger events

    attributes give a % of total hp. So 1 attribute = 5% bonus max hp.
    you can give live fraction with attributes, but it doesnt affect bonus hp gained from leveling

    Posted in: Triggers
  • 0

    posted a message on trigger actions firing other trigger events

    thats what i wasnt hoping for : P
    ill see what I can do with what you suggest

    Posted in: Triggers
  • 0

    posted a message on determining if a unit has an ability but hasnt leveled it

    Im trying to trigger a passive that does stuff whenever spells are cast, ONLY if the hero has already learned one of its abilities

    the problem im having is that current level of ability for unit == 1, returns false when the ability is level 1 (i guess its checking the level index? which first level is technically 0) however, if i say current level of ability for unit == 0, it also runs when the unit hasnt learnt the ability yet.

    is there anyway around that?

    Posted in: Triggers
  • 0

    posted a message on trigger actions firing other trigger events

    @Charysmatic: Go

    and if something both increased hp and changed attributes at the same time? would that not still mess up because the trigger fires the first time, shuts itself off, and then the second time its not active to fire

    Posted in: Triggers
  • 0

    posted a message on trigger actions firing other trigger events

    Hey,

    So I'm having difficulty working my mind around a way to get this to work. I have two triggers. both modify hp, and the event of one is units hp is modified.
    Ill copy my two triggers out below. Basically, I have an attribute that modifies total hp. one trigger fires whenever a unit's attribute is modified, and if it is, update its hp. I have another trigger that when its hp is modified (level up or items), it updates its total hp based on its attribute. I disable the hp modifying trigger in both triggers to prevent infinite loops and the attribute modifying the hp twice.
    everything works well if only one thing changes at a time, but there will be scenarios eventually where something may modify both at once. IF this happens, the attribute trigger disables the hp trigger, so the actual hp change isnt registered.

    How can I prevent attribute gains from firing the hp changes trigger, but also allow for something to increase both the attribute and hp at the same time?
    i hope i explained that properly, ask if anything doesnt make sense

    modifying toughness
        Events
            Unit - Any Unit attribute points changed
        Local Variables
        Conditions
            (Triggering behavior) == (attribute) Toughness
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    ((Triggering attribute points) - (Custom value toughness of (Triggering unit))) > 0.1
                Then
                    Trigger - Turn modifying hp Off
                    Unit - Set (Triggering unit) Maximum Life to ((Custom value Max Hp of (Triggering unit)) * (1.0 + (hp per toughness * (Triggering attribute points))))
                    Unit - Set (Triggering unit) Life Regeneration Rate to ((Custom value hp regen of (Triggering unit)) * (1.0 + (hp regen per toughness * (Triggering attribute points))))
                    Unit - Set (Triggering unit) custom value toughness to (Triggering attribute points)
                    Trigger - Turn modifying hp On
                Else
    
    modifying hp
        Events
            Unit - Any Unit Maximum Life changes
        Local Variables
            gained life = (((Triggering unit) Maximum Life (Current)) - ((Custom value Max Hp of (Triggering unit)) * (1.0 + (0.05 * (Custom value toughness of (Triggering unit)))))) <Real>
        Conditions
        Actions
            Trigger - Turn (Current trigger) Off
            Unit - Set (Triggering unit) custom value Max Hp to ((Custom value Max Hp of (Triggering unit)) + gained life)
            Unit - Set (Triggering unit) Maximum Life to ((Custom value Max Hp of (Triggering unit)) * (1.0 + (hp per toughness * (Custom value toughness of (Triggering unit)))))
            Trigger - Turn (Current trigger) On
    
    Posted in: Triggers
  • 0

    posted a message on units dying no matter the damage

    So weird thing, the damage type was set to spell, and the splash damage type was set to spell, and it ran literally 30 times I changed the splash damage type to splash, and it worked properly.

    Posted in: Data
  • 0

    posted a message on Warhammer 40k: There is Only War [40k moba]

    If it comes down to it, we can rip some wc3 models that are fitting. But we are looking for any user made custom models that would work.

    If anyone wants to design models, or if we can figure out a way to rip from DoW, that would probably be the best case scenario

    Posted in: Project Workplace
  • 0

    posted a message on units dying no matter the damage

    I have an ability that creates a persistant that deals damage periodically in an aoe. no matter what damage i put (its supposed to be 50), it kills any units it hits in one shot.I have the kill flag *not* checked. I even made the persistant use a different correctly functioning aoe damage effect, and they still died. So im inclined to believe its not the damage effect

    what other things may be causing units to die in one shot the effects im using and the tree ability -> persistant (A)

    A, initial -> Set(1)

    A, periodic -> Set(2)

    set(1) -> damage, search(1), search(2)

    search(1) -> apply behaviour (slow)

    search(2) -> apply behaviour (stun)

    set(2) -> search(2), search(3)

    search(3) -> damage effect (one target only)

    damage -> aoe damage, dealing 50

    that should be all the stuff im using, and I have no idea what may be causing units to always die

    Posted in: Data
  • 0

    posted a message on IS it possible to modify the charges of an ability that doesnt use them?

    I have an ability with max charge = 4, starting charges = 4, and charges used = 0

    if I set the charges used to 1, i can modify its charges with triggers if i set the charges used to 0, i cannot modify its charges with triggers

    is there anyway to work around that? Id prefer to keep the charge count visible is there a trigger event that fires when a button is cliked, weather or not the ability goes through? because i can refund charges when the ability is used, but i cant use it (and want to be able to use it) when it has 0 charges. is it possible to detect when an ability is attempted to be used, even if theres not enough mana/cooldown/charges?

    (just for the record, the charges on the ability has nothing to do with the functioning of the ability itself. the charges are used for other things)

    Posted in: Triggers
  • 0

    posted a message on wc3 esque - cloak fade time

    would I edit the user's actor directly, or can I make something just turn the casting unit transparent.

    potentially many units could have this buff, so editing all the actors would be something I would want to avoid if possible

    Posted in: Data
  • 0

    posted a message on Charged ability starting with max charges

    Haha sorry I suck at explaining.

    A is an active ability that refreshes all other abilities. It also gains one charge for every B spell cast, and when it has 5 charges, casting a B spell resets the charges back to 0 and B doesn't go on cooldown

    So I'm giving charges to an ability that doesn't use charges itself. That may be the problem. I mean I can trigger it all but id like the charges to show. And ATM it's always showing 5, no matter what I do to it with triggers

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