SC2Mapster Forums

Development > Triggers

Changing Data values from a trigger?

  • 3 posts
    #1 Nov 18, 2012 at 21:38 UTC - 0 likes

    I want to create a spell that spawns a unit with 20% of the casters HP and 20% of the Attack damage. I will need to set the Hp and Damage with a trigger.

    (This would be for both effects, units, actors, upgrades and in general all data values)

    I saw it done with custom script, but I dont remember how it worked.

    I asume having a trigger with local variables for the type, name, field and value to change instead of changing the custom script.

    Last edited Nov 18, 2012 by Demtrod
    #2 Nov 18, 2012 at 21:41 UTC - 0 likes

    @Demtrod: Go

    You can set a units life with triggers easily- "Set/Modify Unit Property (Life)".

    To change attack damage, I would just apply a buff that reduces all attack damage by 80%. You should not need to change the data values themselves- although you can by using "Catalog field value set".

    Send me a PM with any questions or comments.

    Learn about HotS mods, publishing, and regions here

    #3 Nov 19, 2012 at 01:35 UTC - 0 likes
    Quote from zeldarules28: Go

    You can set a units life with triggers easily- "Set/Modify Unit Property (Life)".

    You could also go the more complicated route with catalogs. Which I would recommend if you plan to try to change a lot of data values via triggers.

  • 3 posts

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