• 🏆 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!

Killed unit spawns another?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
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