SC2Mapster Forums

Development > Triggers

Increasing Attribute amount with triggers?

  • 6 posts
    #1 Nov 19, 2012 at 15:01 UTC - 0 likes

    How do I increase the amount for an attribute behavior (the same way as it's done with a veterancy behavior) with a trigger?.

    I tried using the:

            Unit - Add 1 Stamina to (Triggering unit) from (Triggering unit)
    

    But it does not increase the amount, it just tries to add the behavior to the unit, which it already got.

    #2 Nov 19, 2012 at 16:42 UTC - 1 like

    If I remember correctly, you must create a new behavior which adds a value to a specific attribute and can stack. Then add (or remove) that new behavior to the unit. Adding a veterancy attribute behavior won't work.

    My Projects:
    Malum Ruina: SC2Mapster
    Eternal Exile: SC2Mapster
    Spine Crawler Madness: SC2Mapster
    Xeno Crisis: SC2Mapster

    #3 Nov 19, 2012 at 20:26 UTC - 0 likes

    @BasharTeg: Go

    Does that mean, if I want to increase agility by 10 (permenently) I will have to have a behavior stay on the unit for the entire game? Or is there a way to make the effect of a behavior persist, when removing it?

    (It's a solution, so thank you, I am just conserned that if I have to use this method, having 5 different behaviors each with 600+ stacks. That would end up making the game lag)

    Last edited Nov 19, 2012 by Demtrod
    #4 Nov 19, 2012 at 21:12 UTC - 1 like
    Quote from Demtrod: Go

    @BasharTeg: Go

    Does that mean, if I want to increase agility by 10 (permenently) I will have to have a behavior stay on the unit for the entire game? Or is there a way to make the effect of a behavior persist, when removing it?

    (It's a solution, so thank you, I am just conserned that if I have to use this method, having 5 different behaviors each with 600+ stacks. That would end up making the game lag)

    Yes, these additional behaviors would have to remain on the units. You could create more behavior types to replace smaller amounts. For example, if you have 10 strength+1 behaviors, you could remove those 10 and add 1 strength+10 behavior. This will minimize the total number of behaviors present on each unit.

    #5 Nov 19, 2012 at 22:12 UTC - 0 likes

    @BasharTeg: Go

    Thank you for the help, I set up a system that changes 10 "+1 attribute" into a "+10 attributes", a changes 10 "+10 attributes" into a "+100 attributes".

    #6 Nov 19, 2012 at 23:45 UTC - 1 like

    @Demtrod: Go

    No problem. Good luck on your map!

  • 6 posts

You must login to post a comment. Don't have an account? Register to get one!