![]() |
Constantly Animated Sprites - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Constantly Animated Sprites (/showthread.php?tid=1093) |
Constantly Animated Sprites - Robin - 09-07-2007 This will make it so certain player and npc sprites are constantly animated. My game has the attack frame as a standing still frame, and the frames on either side as stepping frames. Adjust according to your source Here's the function where you set what sprites are constantly animated. Edit it according to your sprite sheet. You could also save them to a file. Code: Public Function IsConstAnim(ByVal sprite As Long) As Boolean In my source, I set a quick if statement to sort out the actual blting, but you can do other wise. Code: If IsConstAnim(GetPlayerSprite(Index)) = False Then Is what I had before the animation is set for the normal walking, then after that is decided I added this: Code: Else Add the required data to the playerrec as a long and byte respectively. For NPCS just change: Code: With Player(Index) to: Code: With MapNpc(MapNpcNum) and the IsConstAnim call to: Code: If IsConstAnim(Npc(MapNpc(MapNpcNum).Num).sprite) = False Then Enjoy. Re: Constantly Animated Sprites - Braydok - 14-08-2007 Last time I checked, I thought that you needed to dim a variable before you used it. I do believe that you did not dim animtimer and animtype. Also, you need to add a end select to the function. EDIT: I tried this tutorial out, and I had to completely revamp it to get the 1st sprite to anim, and none of the others worked, so there is obviously something wrong with this tutorial. Sorry, Robin. Re: Constantly Animated Sprites - Robin - 14-08-2007 This isn't a copy and paste tutorial, and I didn't give you everything so people couldn't just leach. It takes basic programming knowledge to make it work. Re: Constantly Animated Sprites - Braydok - 14-08-2007 I should have thought of that... Well, you might want to post that somewhere, so people don't get confuzled. Re: Constantly Animated Sprites - Robin - 14-08-2007 It's now in the third post down. Re: Constantly Animated Sprites - Braydok - 14-08-2007 Nicely done. Re: Constantly Animated Sprites - Matt - 16-08-2007 I got it working easy. I just added constanim as byte to the npc rec and saved the value of a checkbox to it and then checked that in the bltnpc/top subs. Works perfectly! ^_^ Re: Constantly Animated Sprites - William - 16-08-2007 MIght be cool to make the players eyes close and open. Re: Constantly Animated Sprites - Rezeyu - 16-08-2007 Idle animations ftw. Re: Constantly Animated Sprites - William - 16-08-2007 Rezeyu Wrote:Idle animations ftw.Almost impossible if you have paperdoll. Re: Constantly Animated Sprites - Rezeyu - 16-08-2007 I had idle animations on my paperdoll. =/ Re: Constantly Animated Sprites - William - 16-08-2007 But you'll have to pixel the animation if its not just for the eyes. Re: Constantly Animated Sprites - Matt - 16-08-2007 I only use it for flying creatures. Re: Constantly Animated Sprites - Robin - 17-08-2007 Perfekt Wrote:I only use it for flying creatures. Same. I remember bringing it up ages ago with DarkAngel. Re: Constantly Animated Sprites - Soyokaze - 05-05-2008 EDIT: Nevermind! I got it working finally, just had to save to a text box instead! ^_^; This is so awesome! |