How can I give my minion an area of effect debuff?

Yzaz

Terrarian
Hi, i want my minion to give a certain debuff on enemies. this should be triggered every 30 seconds and affect all enemies within a certain radius of the player but i don't know exactly how. this is my code so far for the minion's ai:
Screenshot_6.png
 
Create a timer that will activate every 30 seconds:

int Timer; // out of AI

if (Timer == 0) {
// other code here
Timer = 30 * 60; // 30 seconds * 60 ticks (60 ticks = 1 second)
}
Timer--;
 
Create a timer that will activate every 30 seconds:

int Timer; // out of AI

if (Timer == 0) {
// other code here
Timer = 30 * 60; // 30 seconds * 60 ticks (60 ticks = 1 second)
}
Timer--;
First of all, thanks for your answer! I was visiting a friend of mine these past few days and didn't see your reply here, so sorry for that delayed answer.
the thing is, the timer does function but my debuff code is not and I don't really know why. This is my current code (the line"Projectile.position = owner.Center + new Vector2(-12f, -80f);" in the timer if statement ist just a visual change to see when the timer will trigger - don't mind it)
Screenshot_1.png
 
Back
Top Bottom