View attachment 143903 View attachment 143902View attachment 143903
public override Texture2D GetTexture()
{
int f = Main.rand.Next(0, 10);
if(f >= 0 && f <= 0)
{
return mod.GetTexture("Tiles/trees/loottree1");
}
else if(f >= 1 && f <= 1)
{
return mod.GetTexture("Tiles/trees/loottree2");
}
else if(f >= 2 && f <= 2)
{
return mod.GetTexture("Tiles/trees/loottree3");
}
else if(f >= 3 && f <= 3)
{
return mod.GetTexture("Tiles/trees/loottree4");
}
else if(f >= 4 && f <= 4)
{
return mod.GetTexture("Tiles/trees/loottree5");
}
else if(f >= 5 && f <= 5)
{
return mod.GetTexture("Tiles/trees/loottree6");
}
else if(f >= 6 && f <= 6)
{
return mod.GetTexture("Tiles/trees/loottree7");
}
else if(f >= 7 && f <= 7)
{
return mod.GetTexture("Tiles/trees/loottree8");
}
else if(f >= 8 && f <= 8)
{
return mod.GetTexture("Tiles/trees/loottree9");
}
else if(f >= 9 && f <= 9)
{
return mod.GetTexture("Tiles/trees/loottree910");
}
else //this is not used but is needed
{
return mod.GetTexture("Tiles/trees/loottree1");
}
}
as the 2 pictures show they are taken one after the other and the trees blink fast
(i think per game tick)
also i did not think it randomize per piece but it did
is there away to get this code to only run once when the tree grows
(tho this looks really cool)