• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

[Need Info] How dynamic is the Data Editor?

Status
Not open for further replies.
Level 8
Joined
Oct 2, 2013
Messages
288
Is it possible to make your Effect: Vitals depend on changing numbers like variables?

For instance:
I have an ability that removes 50 energy points.

Now I want it to remove an amount depending on a variable that changes throughout the game.

So if the variable is 23, the ability will remove 23 energy points -and if the variable changes to 46, the ability will remove 46 energy points.


Back in Warcraft 3 this was achievable throughout triggers. It seems possible with triggers in Starcraft 2 as well. But from what I heard, the data editor is a lot more advanced now and many things have become possible without the use of triggers. Is this case one of them or can it only be done by triggers?

Thanks in advance.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,266
You will need triggers for this since being a variable only triggers can access it.

There are two possible ways to implement it.

The first and easiest is to trigger enhanced the effect. When the effect is used you simply remove the variable amount of energy from the source/target unit.

The second is slightly more tricky and is player wide (PUI not MUI). Every time the variable is modified you use the catalog natives to modify the energy removing effect for the appropriate player, setting the amount of energy to remove to that defined by the variable. This will even reflect in tooltips that use text with links to that field (once refreshed, not ones currently visible). Since you are modifying the effect for the player it might not be fully MUI since if he has two units with the same ability and which need different amounts it will break. If you want it player wide it is perfect and I would recommend this approach over the first.
 
Status
Not open for further replies.
Top