DoYouEvenCookie
Terrarian
H'ok... The Solarius item wasn't working because item.useAnimation was 1. I don't know how small it can be, but vanilla uses 25 there. Also, in the projectile, you've got 'projectile.type = ProjectileID.Arkhalis;' which will make the item a cosmetic clone of Arkhalis. If you want to use your own sprite, you'll need 'aiType = ProjectileID.Arkhalis;' instead.
Now, if you want to delay the projectile from homing in on enemies, then create an int to use as a timer, then place your homing code inside an if statement that checks if your int is above a specific value, and if it isn't, increase the timer. To adjust how quickly your projectile accelerates, change the 1.5f in the line 'projectile.velocity += acceleration * 1.5f;'
To make the projectile return to the player when it hits something, set 'projectile.ai[0]' to 1. The hooks onHitNPC, onHitPVP and onTileCollide are where you'll want to do this.
I tried to use onTileCollide, but it failed
code
Code:
public override bool OnTileCollide(Vector2 oldVelocty)
{
projectile.ai[0] = 1;
}
error
not all code paths return a value.
and the line numbers are pointing to OnTileCollide