Editing attributes with a trigger

Frozenwind

System maker
Reaction score
99
You mean STR etc.?

You need the function:

Code:
unit - apply effect

This effect should be of the "add behavior" kind. All you have to change to it is the behavior it's linked to, which is the following:
Create a behavior of the type "modify attributes". If you take your time, I'm sure you can figure out what to set, as I haven't investigated this particular behavior yet. "Stats - flag = hidden" makes it not show a buff. "Stats - duration" is how long the attribute change is applied to the unit.
 

Flare

Stops copies me!
Reaction score
662
By attribute, you mean crap like health, energy, shields, damage, armor etc? Sorry if this is obvious, but SC2 has thrown my 'normal' definition of various terms right out the window :p
Trigger:
  • Add Behavior
    • Count: 1
    • Behavior: (No Value)
    • Unit: (No Value)
    • Caster: (No Value)

Just create a Buff/Attribute behaviour (depending on how you want to do it, I'm guessing that Attribute will stay until you remove it) and add it to the unit - at least, I think that should work... :eek:
 

Frozenwind

System maker
Reaction score
99
Yes, attribute changes stay until it's removed (which is when the duration expires or when it's down through triggers).

But if there is a straight way to add a behavior, then what's the point of the effect "add behavior"? Only used for dataeditorabilities I guess?
 

Frozenwind

System maker
Reaction score
99
I'm using "unit - apply effect". This effect is an "add behavior"-effect. Meaning I got a way around the "unit - add behavior", through an effect.
 

Flare

Stops copies me!
Reaction score
662
I'm using "unit - apply effect". This effect is an "add behavior"-effect. Meaning I got a way around the "unit - add behavior", through an effect.

Well, why would you want to circumvent the (seemingly) direct route - anyway, there are many different types of Effects available, not all of them are capable of applying behaviours, so I would assume that Add Behaviour exists for providing the most convenient method of applying a behaviour (since no Apply Behaviour Effect middle-man is required), and Add Effect gives you the most convenient (probably the only logical way of doing it, really) method for applying any type of effect.
 

The Undaddy

Creating with the power of rage
Reaction score
55
You mean STR etc.?...the unit.

Yes, thats what i was looking for.It didn't occur to me how vague what I said was in the context of the starcraft editor. :eek:

Is it me or does everyone else feel like the starcraft data editor is 50% of the warcraft's trigger editor o_O

EDIT:

Also, I kinda don't want to open a new thread, where are the starting locations or galaxy initial camera effects or whatever they are called now?

EDIT2:

I can't seem to find the modify attributes behavior type, could it be called something else?
 

Flare

Stops copies me!
Reaction score
662
I can't seem to find the modify attributes behavior type, could it be called something else?
There's only Buff and Attribute (of the Behaviours that are relevant to what you're asking, that is) - AFAIK, they can both apply the same modifications (through the Behaviour - Modifications+ field), but Buffs seem to have the addition of an (optional) duration and periodic 'execution', for want of a better word. I haven't looked into Attributes heavily, but they have very few properties associated with them - seems to be most useful as a permanent, passive boost.
 

The Undaddy

Creating with the power of rage
Reaction score
55
Okay, I finally made it work yay :D (using apply behavior because I really didn't see any point in using an effect, though there may be for other cases)

But a couple more questions - does the casting unit matter? And also I can set it to 'null' using custom script, but I cant select 'No Unit' from any preset value, could this make any problems (the casting unit being null) ?

And if the duration of the behavior/buff is 0 - that means its permanent, right?
 

Flare

Stops copies me!
Reaction score
662
(1) Depends, really - I suspect that Damage effects need a Casting Unit (or damaging behaviours) for the sake of giving credit to the correct player in the event of the target unit dying

(2) From what I've seen, ye - accidentally left a behaviour Duration at 0 earlier, and it persisted for the duration of my test run (which was probably no more than a minute). You can test just how long it's capable of lasting, but I'd say it's safe to assume that Duration - 0 results in infinite duration (until forcibly removed by triggers, or something)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top