PDA

View Full Version : Hold out



Lelouche Vi Britannia
09-04-2016, 03:37 PM
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.

ZoriaRPG
09-08-2016, 07:13 AM
lweapon l;
l->UseSprite(sprite);
l->Tile = tile;
l->Flip = flip;


Those are your options.

Lelouche Vi Britannia
09-08-2016, 10:55 AM
I assume for sprite I'd use the sprites number found under graphics. When would I need to use Flip?

Lelouche Vi Britannia
09-08-2016, 06:15 PM
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.

ZoriaRPG
09-11-2016, 10:09 PM
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.

Lelouche Vi Britannia
09-12-2016, 08:30 PM
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.

ZoriaRPG
09-13-2016, 10:22 PM
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.


The projectiles are sprites, so, in the sprite editor, tick 'Flash CSet'.

Lelouche Vi Britannia
09-14-2016, 05:02 AM
*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.

ZoriaRPG
09-15-2016, 02:47 PM
*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.

Have it all sorted now, then?

Lelouche Vi Britannia
09-15-2016, 09:43 PM
Yes. Just need to experiment with the x and y placement to make the weapon tile look right.