• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

a virus is spreding

Status
Not open for further replies.
Level 6
Joined
Apr 30, 2008
Messages
153
ok can some one help me with my spell i would like a spell that is a virus
like if one unit gets killed with the virus it brings them back and the quickly(like really fast) attack another unit and then it dose so so on and so forth
but the thing is that the virus is an item so like when that unit is attacked and killed buy the infector it gains an item and becomes owend buy a different player
 
Level 11
Joined
Apr 6, 2008
Messages
760
everytime a units get attacked check if they have the item and check the attacker if its a zombie and add the item to thier inv, if inv is full drop an item.

and for the dieing part just check if dieing unit has item(above), if the have replace unit with owner of killing unit as owner
 
Level 11
Joined
Oct 13, 2005
Messages
233
Your post is slightly confusing and I am unable to understand exactly how you want the spell to work. Here are some things I'm unsure of:
  • Is the spell cast on a unit and then if they're killed, then are they brought back?
  • If so, is the spell buff temporary or lasting until death?
  • Who is under control of the unit brought back from the dead?
  • Do the zombies give the same spell buff to other units, or is it simply when they kill a unit they're also a zombie? (Do the units become zombies when anyone kills them, or only when another zombie kills them?)

Also, one last point is that buffs are very unlikely to work properly. The reason for this is that once a unit dies, the buffs it had can no longer be detected. A better option would likely be to add a custom aura ability to the unit or something similar which will remain after death.
 
Level 17
Joined
Jan 21, 2007
Messages
2,013
Let's see, you want units to become a zombie when killed by a zombie, or when dying when they have been attacked by a zombie?

Firstly create 2 spellbooks. Then create two dummy abilities based on any aura and null the effects and range of them. Name them "Zombie" and "infected".
(important! make custom buffs for them!)
Add the dummy abilities into a spellbook each.
disable the spellbook abilities in map init. (Important! not the auras!)

Events - A unit dies.
Conditions - Killing unit has buff (Zombie) or Level of (infection spellbook) is equal to 1
Actions - Set (unit variable) - dying unit
wait 2 seconds.
Create 1 unit type of (unit variable) at position of (unit variable) for (zombie player?)
Add (spellbook zombie) to last created unit
remove (unit variable)
set (unit variable) = no unit


Event - a unit is attacked
Condition - Attacking unit has buff (Zombie) and Attacked unit has buff (infected) equal to false
Actions - add (Infection spellbook) to attacked unit.


This way your zombies and infected will have an invisible ability (which i think is the easiest to manipulate) and other players may still see if they are a zombie or infected by looking at their buffs!
Not sure if they reanimate part is correct, dunno if i got you right, but it creates a new unit of same type at the position and removes the corpse. I could add an animate dead animation to if you want xD
 
Status
Not open for further replies.
Top