So no idea if this was solved but off the top of my head I don't think it would be super hard to do:
First create a behavior of type buff (infectious), this will be the buff that makes a unit contagious. In a behavior there is an option for period and periodic effect, period = the interval at which the periodic effect happens. We want that periodic effect to search the area for possible victims to infect.
So then we create an effect of type search area (Search for Victims). Open the area field, click the + button and set how big you want the search radius to be, maybe like 2-6. The effect field says what effect will happen to targets found. So,
Create a new effect of type apply behavior (Infect) set the behavior it applies to (infectious) if you want victims to spread the virus too, if not you'll need a separate behavior.
Now we need to go back and connect them, so for (infectious) set the period effect to (Search for Victims). In (Search for Victims) go into the area field and set the effect there to (infect).
All that is left to get this working is to set up the chance of infecting people over time. The period field in (infectious) says how often it searches, I would set this to about .25, I think this means every quarter of a game second it will search. You can then either set the chance field in (infect) or (search for victims). Using infect will give each unit an independent chance of being infect, using search for victims will mean they are all either infected or not. I'd set the field in infect. You could make it like 2.5% or 0.025 X 4 times per second = 10% chance per second of any unit in range being infected.
For the initial infection attack
Not at editor atm but my thinking is you'll need to create an effect that has a random chance of infecting that fires along side the weapons regular damage, so:
Create an effect of type apply behavior (Initial infect) give it whatever chance you want of it infecting the unit per attack in the chance field, set the behavior it applies to (infectious)
Create an effect of type set (Poison attack set) and add the (initial infect) effect as well as your weapon damage to the effects field.
Go to your weapon, set the effect to (Poison attack set) now any attack will damage and have a chance to infect the victim.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
For the virus
So no idea if this was solved but off the top of my head I don't think it would be super hard to do:
First create a behavior of type buff (infectious), this will be the buff that makes a unit contagious. In a behavior there is an option for period and periodic effect, period = the interval at which the periodic effect happens. We want that periodic effect to search the area for possible victims to infect.
So then we create an effect of type search area (Search for Victims). Open the area field, click the + button and set how big you want the search radius to be, maybe like 2-6. The effect field says what effect will happen to targets found. So,
Create a new effect of type apply behavior (Infect) set the behavior it applies to (infectious) if you want victims to spread the virus too, if not you'll need a separate behavior.
Now we need to go back and connect them, so for (infectious) set the period effect to (Search for Victims). In (Search for Victims) go into the area field and set the effect there to (infect).
All that is left to get this working is to set up the chance of infecting people over time. The period field in (infectious) says how often it searches, I would set this to about .25, I think this means every quarter of a game second it will search. You can then either set the chance field in (infect) or (search for victims). Using infect will give each unit an independent chance of being infect, using search for victims will mean they are all either infected or not. I'd set the field in infect. You could make it like 2.5% or 0.025 X 4 times per second = 10% chance per second of any unit in range being infected.
For the initial infection attack
Not at editor atm but my thinking is you'll need to create an effect that has a random chance of infecting that fires along side the weapons regular damage, so:
Create an effect of type apply behavior (Initial infect) give it whatever chance you want of it infecting the unit per attack in the chance field, set the behavior it applies to (infectious)
Create an effect of type set (Poison attack set) and add the (initial infect) effect as well as your weapon damage to the effects field.
Go to your weapon, set the effect to (Poison attack set) now any attack will damage and have a chance to infect the victim.