• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] Infestation spell (either spawn X units or remove all building trainables and researches)

I am making a variation of SC1 Queen's Infest Command Center spell for WC3.

I don't want to make it target only specific Town Halls, so I am making some changes, but I have no idea if it is possible to implement them.

1. My first idea is to make a Parasite-like ability that spawns X units if the target building dies within 3 seconds, where X is equal to (Max building HP)/(Max spawned unit HP) - no less than 1, and rounded down.
However, I can't figure out how to register if dying unit had a specific buff - Unit Dies event with check for buff does not show unit as having that buff.

2. Second idea is to make a Channel ability, then if during the cast duration the building is at 50% or less health, change building owner to the caster player, disable all training, upgrade and research available in it and add the Infested unit as a mercenary (Sell unit ability + trigger action).
But I have no idea how to disable trainable units and researchable upgrades (including upgrading the building itself).

Can someone suggest to me solution to either of these issues?
 
Option 2 looks doable, in Scenario > Techtree properties you can disable individual units and upgrades per player

1763487320350.png


Or do it via trigger

  • Player - Make Footman Unavailable for training/construction by Player 1 (Red)
 
Option 2 looks doable, in Scenario > Techtree properties you can disable individual units and upgrades per player

View attachment 557783

Or do it via trigger

  • Player - Make Footman Unavailable for training/construction by Player 1 (Red)
Thanks but not really an option - player may get access to the usual building at some point and has to be able to train usual units. I was thinking of disabling on a per-building basis.
 
I think you can trigger it with a custom Berserker Upgrade ability. Basically the building instantly gets updated/upgraded to your infested variant when you trigger it via an ability/effect or however you need.
Thanks, it seems this is the only proper way (replace or upgrade).
I was kinda trying to avoid making extra unit types at this point though but it seems to be impossible (I already have almost 1000 custom unit types for different purposes, still need to make copies of creeps of levels 4-9 and may have to make more dummy units for spells, so I don't want to overload WE if possible :) ).
 
Back
Top