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

Help with an infectious (contagious) disease (cloud)

Status
Not open for further replies.
Level 4
Joined
Jun 30, 2008
Messages
92
I'm attempting to make a disease that spreads continually.

I'm basing it off the abom's disease cloud ability. What I want is for it to transfer to its victims.

[Example]
Zombie (with infection) gets within 100 of peon. Now the peon is infected, this peon now runs away and gets within 200 of peon2. Peon two is now infected as well, he goes on and runs into a bunch of other peons, they all get infected... and continue.
[/Example]

I'm not sure how to work it though, can anyone help out?
 
Level 9
Joined
Apr 6, 2008
Messages
436
Well, it's not very easy, do like this:
-Create an ability which is a disease cloud which hurts nearby FRIENDLY units. I will call this ability <BUBBA>
-Then create this trigger:
  • Events
    • Time - Every 0.20 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units in (Entire map) matching ((Matching unit has buff <HERE CHOOSE A RANDOM BUFF, IT'S NOT IMPORTANT>) Equal to TRUE))
      • Loop - Actions
        • Unit - Add <BUBBA> to (Picked unit)
Now, go to the top of the window, click Edit---> Convert to custom text.
You will obtain a long strange text.
Replace the second line of this text with this
JASS:
    return ( UnitHasBuffBJ(GetFilterUnit(), 'Bplg') == true )
then basically you just had to insert 'Bplg' instead of the name of the previous buff.

I made you do all this because the GUI version of this trigger just doesn't work.
 
Level 4
Joined
Jun 30, 2008
Messages
92
Ok I kinda get that, but I don't want everyone to have that ability... Just those that get affected.

I've already made a custom disease cloud ability, and changed the buff it lists, but it still uses disease instead of my custom buff.

Can you explain why it doesn't work.

What I had before is...

  • Contagion
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Contagion (Zombie)) Equal to True
            • Then - Actions
              • Unit - Add Contagion (Infectee) to (Matching unit)
            • Else - Actions
              • Unit - Remove Contagion (Infectee) from (Matching unit)
It has a 10 second check because it's not too important, the buff's duration is 60 seconds, and I don't want to clog the game up with checks.

What is wrong with this?
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
add all your zombies to a unitgroup

  • Events
    • a Unit comes within 100 of random unit from zombie unitgroup
  • Conditions
  • ....
  • Actions
    • Unit - add desease to triggering Unit
    • wait 60 seconds
    • Unit - remove desease from triggering Unit


  • Events
    • Time - every 1 second of the game
  • Conditions
  • Actions
    • Unitgroup - pick every Unit in all Units and do Actions
      • if - Conditions
        • picked unit has buff <your desease>
        • picked Unit unit type not equal to zombie
      • then - actions
        • add picked Unit to desease Unitgroup
      • else - actions
  • Events
    • Unit - a Unit comes within 200 of random Unit from desease Unitgroup
  • Conditions
  • Actions
    • Unit - add desease to triggering Unit
    • wait 60 seconds
    • Unit - remove desease from triggering Unit
the wait is the duration of your spell
 
Status
Not open for further replies.
Top