• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Storm Earth Fire & hide/unhide

Status
Not open for further replies.
Level 12
Joined
Feb 27, 2019
Messages
399
Hello,

"Storm Earth Fire" ability is the ability that splits the pandaren into 3 little pandas for a given duration. After some tests, I think that the ability works as follow:
Phase 1 - Hide the caster. It is hidden & unselectable, not-paused but somehow unmovable.
Phase 2 - Create 3 units (the 3 little pandas). They are hidden & unselectable.
Phase 3 - Create 3 missiles and animate them.
Phase 4 - At the end of animation, make the 3 little pandas visible.
Phase 5 - When the last panda dies or disapears, make the caster visible again.

Do you agree with that ?

Now the problem:
I am executing some piece of code at the end of phase 2 to modify the stats of the little pandas. The piece of code gets and modifies base armor (it's from a system I am currently coding). It unhides & hides the unit instantly for a little test.

It seems to bug: in phase 4, little pandas remain hidden. It seems that the hide unit functions* overrides the behavior of the ability. (*"Unit - Hide" in GUI, or ShowUnit/ShowUnitHide in JASS). If I remove this function, the spell works fine, so this is the culprit.

Is there another way to re-hide the unit without breaking the spell ?

Otherwise, is there a way to differenciate the 3 little pandas of any unit that would have been hidden by the GUI or JASS functions ?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
Speaking on Phase 5. If all all of the Elements (little pandas) die then the Brewmaster dies too. But if the Elements survive the entire duration of the spell then the Brewmaster will spawn at one of their positions. I believe the priority for this spawning effect is: Earth > Storm > Fire.

That being said, I'm pretty confused on what you're trying to achieve. Why do you need to hide/unhide the Elements? You said it's for a "little test" but if that's the case then couldn't you just remove the test.

This trigger works fine:
  • Brewmaster
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Earth
          • (Unit-type of (Triggering unit)) Equal to Fire
          • (Unit-type of (Triggering unit)) Equal to Storm
    • Actions
      • Unit - Set Armor of (Triggering unit) to 20.00
 
Level 12
Joined
Feb 27, 2019
Messages
399
Sorry I was quite vague about it.

I am making a "Armor" system. The system will provide getters & setters (when possible) for each compound of units' armor:
- Base = base defense + upgrades by default (or modified value)
- Agility (with or without bonus)
- "White" armor = base + agi(bonus excluded)
- "Green" armor = abilities bonuses + item bonuses + agility(bonus only)
- Damage reduction factor

Indeed the BlzGetUnitArmor & BlzSetUnitArmor only give access to total armor, it's so hard to use them efficiently...

However, my System works thanks to a little trick: the possibility to temporary add a -100% self-devotion aura to the unit ^^
Without that I am unable to compute the base armor of the unit...

All the other alternatives I thought of are:
- Temporary remove all bonus armor from the unit
> Option A: temporary kill it
> Option B: temporary remove all buffs & items​
- Temporary create another unit of same type without the bonus armor.

...And it would be really dirty for getters/setters to do that, and the site effects (buffs lost, events fired) are not negligible...
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
4,992
Is there some reason you can’t wait until phase 4 to do your armor setting? If detecting it is a problem surely the time between phase 2 and 4 is constant every time and you could delay from an event at 2 with a timer.
 
Level 12
Joined
Feb 27, 2019
Messages
399
Is there some reason you can’t wait until phase 4 to do your armor setting? If detecting it is a problem surely the time between phase 2 and 4 is constant every time and you could delay from an event at 2 with a timer.

Well for my particular issue I can handle it by adding a timer or a wait, no problem.

It is just because it is, as I said, a system that I think I'll release, so I was afraid of:
- Other side effects of unhide/hide (mirror image, locust, burrowed or submerged units, ...)
- Map-makers finding the handling of this bug ugly (since I cannot detect it)
 
Status
Not open for further replies.
Top