Code: Select all
class Invticker:Inventory{
default{
inventory.maxamount 100;
}
override void DoEffect(){
// override void Tick(){super.Tick();
if(amount>0){
amount--;
}
}
}
class Invgetter:Demon{
states{
melee:
SARG EF 8 A_SetTics(random(7,9));
SARG G 10{
int b=target.countinv("Invticker");
A_LogInt(b);
for(int i=0;i<b;i+=10){
spawn("Blood",pos+(random(-1,1),random(-1,1),50));
}
}goto see;
}
}
If I replace DoEffect() with Tick() (as shown in the commented-out line), it's fine.
I suspect it's related to why an RNG call would also cause problems (and why I couldn't replicate it in vanilla - the isolated example didn't have anything that another actor would depend on for anything affecting the playsim).