Quick script question. When scripting a weapon, how do I set what sprite is used when the weapon is held and visible when used (like swords and wands)? I can't find the function / command to do it.
Printable View
Quick script question. When scripting a weapon, how do I set what sprite is used when the weapon is held and visible when used (like swords and wands)? I can't find the function / command to do it.
Those are your options.Code:lweapon l;
l->UseSprite(sprite);
l->Tile = tile;
l->Flip = flip;
I assume for sprite I'd use the sprites number found under graphics. When would I need to use Flip?
Answered question about multiple lweapons. New problem, getting the wand to face the right direction. It's stuck pointing up. Tried using Flip, but I guess I'm not doing it right.
That's where you use l->Tile and l->Flip: You want to set up a pair of tiles, one facing up, the next tile on the page facing right. Set l->Tile to the first of the two, and if Link->Dir == DIR_DOWN, set its flip to flip down. If Link->Dir == DIR_LEFT or DIR_RIGHT, use l->Tile++ and set the Flip based on his direction.
Ok, got that working now. Thanks for your help. But now I have a new question. How do I set up the auto flash. I'm trying to flash the projectiles between CSet 6and CSet 0 just like the wand magic does. I'm not good with bool so please bare with me.
*REDACTED* I shouldn't post just after waking up. I realized my stupidity after I posted it. As usual I'm making a mountain out of a molehill.
Yes. Just need to experiment with the x and y placement to make the weapon tile look right.