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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top