Quote Originally Posted by Lelouche Vi Britannia View Post
Ok so here is the data from my first attempt.

Code:
const int BOLT_NOUSE = 64;//1 second pause
const int FLIP_NO = 0;//no flipping
const int FLIP_H = 1;//Flip Horrizontal
const int FLIP_V = 2;//Flip Vertical
const int FLIP_B = 3;//Rotate 180 degrees
const int BOLTCSET_NF = 6;
const int BOLTCSET_F = 0;

item script BoltSpell //basic use a wand and cast a spell stuff
{
	void run(int power, int arrowSprite, int speed, int wandSprite)
	{
		int startX;
		int startY;
		lweapon l;
		lweapon bolt;
		startX = Link->X+8;
		startY = Link->Y+4;
		Link->Action = LA_ATTACKING;
		l = NextToLink(LW_WAND,8);
		l->Tile = wandSprite;
		if (Link->Dir == DIR_UP)
		{
			l->Flip = FLIP_NO;
		}
		if (Link->Dir == DIR_DOWN)
		{
			l->Flip = FLIP_V;
		}
		if (Link->Dir == DIR_RIGHT)
		{
			l->Tile++;
			l->Flip = FLIP_NO;
		}
		if (Link->Dir == DIR_LEFT)
		{
			l->Tile++;
			l->Flip = FLIP_H;
		}
		bolt = NextToLink(LW_ARROW, 8);
		bolt->UseSprite(arrowSprite);
		if (Link->Dir == DIR_UP)
		{
			bolt->Flip = FLIP_NO;
		}
		if (Link->Dir == DIR_DOWN)
		{
			bolt->Flip = FLIP_V;
		}
		if (Link->Dir == DIR_RIGHT)
		{
			bolt->Tile++;
			bolt->Flip = FLIP_NO;
		}
		if (Link->Dir == DIR_LEFT)
		{
			bolt->Tile++;
			bolt->Flip = FLIP_H;
		}
		bolt->Damage = power;
		bolt->Step = speed;
		Link->ItemJinx = BOLT_NOUSE;
	}
}
Problem 1: The wand is being rendered too high vertically on Link's spirte. I compared it to the sword location and it appears to be a good 6 pixels or so higher (about nose level instead of hand level). I tried reducing the Y position to +4 from +8 (line 18), but that had no visual effect at all on the placement of the sprite. How do I fix this so it looks like a normal use of the wand?

Problem 2: Not sure if this is possible but can the damage type of the attack be changed to fire? This is supposed to be a fire rod after all. Also would like to know how to get the bolt to render an actual flame at the impact point.

Next Steps: Currently contemplating using an advanced dark room script to make LttP style braziers. I thought it would be possible to allow the Fire Rod to light them either by using an invulnerable enemy that is invisible set on the brazier. However the thought also occurred that this would probably work better as an FFC script but I am rubbish at those currently.

Currently for the "Next Steps" portion I am considering using the "Subpar Dark Room Script" found on Pure, unless someone could suggest a better one?


In general, you want LW_SCRIPT for this, or LW_BEAM, or even LW_REFMAGIC.

There was a recent request on Pure for this sort of thing, but I frankly do not want to do it until 2.54 is out, and I can make it both cleaner, and easier.