• 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.

Killed unit spawns another?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
How are you making this zombie currently? If it is by dark arrows or parasite abilities then you will have to move it to trigger script.

If it is done via trigger script, simply add a conditional branch to creating the unit (an in then statement). Using the chance of a random element in a set you can easilly devise a condition to run the script.

{0,1,2} is the set
if the random element from the set is 0 then create the unit.

JASS:
if GetRandomInt(0,2) == 0 then
//create unit goes here
endif

This is also possible using GUI.

Your trigger will need to be attached to a unit is killed event with appropiate conditions to test if the unit which did the killing is eligable for the zombie spawn roll.
 
Status
Not open for further replies.
Top