• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Powerups and PauseUnit

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,100
Want to share knowledge about a quirk I just found:

If a unit is paused (not stunned but via PauseUnit), it does not accept powerup items. Although UnitAddItem returns true, no pickup events are fired and the item is dropped again to its previous location. So this might meddle with some systems like setting a unit's white attack damage.
 
Scrap :|. This will mess up my triggers :D. Thks for such an useful share.
Btw, if we cannot use PauseUnit, is there any other way to disable that unit (not hidden, no stun, hex plz :D).
 
Btw, if we cannot use PauseUnit, is there any other way to disable that unit (not hidden, no stun, hex plz :D).

Order it to use an ability based on Channel, set Follow through time to some long time, disable other abilities to true and Options - visible to false (unticked). If I remember correctly, this does not have the downsides of PauseUnit. However stunning the unit might break the channel.
 
Wouldn't unpausing the unit, adding them the item and pausing them again work?

I know that I had a similar issue with hexed units (they didn't receive buffs from auras, and all my non-stacking buffs are based on the slow aura) and a custom rutin that removes the hex buff from them, adds the buff ability (the aura) and hexes them again if they had been previously hexed, solves the problem. So it might help here too.
 
Wouldn't unpausing the unit, adding them the item and pausing them again work?

I know that I had a similar issue with hexed units (they didn't receive buffs from auras, and all my non-stacking buffs are based on the slow aura) and a custom rutin that removes the hex buff from them, adds the buff ability (the aura) and hexes them again if they had been previously hexed, solves the problem. So it might help here too.

I'm not sure pause and/or unpause an unit is something instant, i vaguely remember an issue about that.
 
It's not that I desperately need PauseUnit. Just used it in a place where it was okay, later on occured the problem.

PauseUnit also stores all the instant orders given meanwhile, then executes them when unpaused.

About hex: There is a flag in gameplay constants that morphed units can grant auras. It does not seem to work however.
 
Just don't use pause unit, you can pause a unit by stacking "stop" order but it's not good too ^^

The only time I've used it was to abuse glitches, but that's about it. I've never made a Kamehameha spell either, so it hasn't been necessary for me at all (for Kamehameha it is though, because it's not a real Kamehameha spell if it's MUI, not uses PauseUnit or isn't done in GUI). SetUnitPosition works just fine for me. The reason why I suggested the unpause/repause solution because it might be necessary for some people for certain things, like WaterKnight said above.

I'm not sure pause and/or unpause an unit is something instant, i vaguely remember an issue about that.

Well, IDK, I can live without it, as I said. I've seen it used to give a unit the stop order, for example, so as I said, IDK. It's definitely worth a try, though.

About hex: There is a flag in gameplay constants that morphed units can grant auras. It does not seem to work however.

Hmm, I didn't know about that flag. I haven't been in the gameplay constants menu since I started working on IID, which was roughly 2 years ago, and the first (and for now, the only) spell that uses it was made like a year later. But the hex/unhex solution works perfectly fine, and because adding a buff is now done via a wrapper (that's used by the buffstruct too), if I need to change anything buff related, or a similar problem pops up again, I can just change that rutin without having to go through everything.
 
Status
Not open for further replies.
Back
Top