[how to] Max Shield = Current Shield

Ghin

New Member
Reaction score
2
I am trying make a shield buff on a unit but i want it in such a way that the value of the shield would seem like just for one time use.
So I wanted the max shield to be always just as much as the current shield up to the point that it is depleted.
Any method is acceptable, but i prefer using data modules only.
 

X-maul

AKA: Demtrod
Reaction score
201
Just to clarify, you want a shield that will block 100 (for en example) damage, and then disapear?
Also, this should should not display as the normal shield with 100/100 shield?
 

Ghin

New Member
Reaction score
2
No i want the shield to show, but I want it in such a way that when the shield is damaged, the max shield value goes with it
 

Ghin

New Member
Reaction score
2
yes i made the shield-regen to zero because that is what I want in a sense.
that being said can I just turn of the max shield stats entirely while retaining shield?

because lowering max shield to the amount of current using periodic effect of any kind can on go as fast as it can, while i wanted it to look instant.
 

Dave312

Censored for your safe viewing
Reaction score
269
I know you prefer a data solution, but I would be using a trigger to do it as it is much more efficient (and easier):
Trigger:
  • Max Shields
    • Events
      • Unit - Any Unit Shields changes
    • Local Variables
    • Conditions
      • ((Triggering unit) has <YOUR_BEHAVIOUR>) == True
    • Actions
      • Unit - Set (Triggering unit) Maximum Shields to ((Triggering unit) Shields (Current))


One problem I can this with doing this is a that according to the unit's Status UI (the stuff that shows up when a players mouse hovers over the unit), the unit will always appear to have 100% shields which could be very misleading.
 

Ghin

New Member
Reaction score
2
Thank you for the trigger example,
why are trigger more efficient than the data module?

the unit will always appear to have 100% <-dont worry that is intended
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
why are trigger more efficient than the data module?

The data editor is great for its intended use and sometimes great at other stuff as well. However, some things are impossible or very complex to do in the data editor. In those cases, you should most likely use the trigger editor instead. They complement each other very well.

I prefer data solutions if they're not too messy and I think it's good that you do too. Just remember to be prepared to use triggers if necessary.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top