![]() |
Continuous Animation - Printable Version +- Mirage Engine (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: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Continuous Animation (/showthread.php?tid=304) |
Continuous Animation - Rian - 13-09-2006 I was thinking it'd be neat to have a "Continuous Animation" option on NPCs. For example, you want to make a bird npc. Check a "Check Box" on the npc editor, and the birds animation continues to run even when he isn't switch tiles. That way we don't have birds flying around that only flap thier wings when they're moving. I'm gonna attempt this, but I'm horrible at blting. Infact, I've pretty much NEVER touched any of the code that deals with NPCs walking. Any one have any ideas, tips, or pointers? - Dragoons Master - 13-09-2006 It's not hard to be done. You need to change the BltNpc sub a bit, like adding a timer for the npc animation speed and a few other things and w/ it just change the Anim var as much as you need. - halla - 13-09-2006 True make sure not to do it for all of the npcs though as you will have say a skelton walking in place... - Nongnong - 13-09-2006 You mean like an npc which can jog in place or something ya that sounds pretty cool if you need the animation i can make them run continuously - Clu - 13-09-2006 couldnt you just take the keyboard moving thing(like press left and it runs the left animation) and delete the key pressing part? - halla - 14-09-2006 Soccertise Wrote:You mean like an npc which can jog in place or something ya that sounds pretty cool if you need the animation i can make them run continuously the animations is already there. he just means having the moving animation constantly instead of only when moving... so like he said the bird would have its wings flapping even when not moving good for aerial npcs - Obsidian - 14-09-2006 i think this MIGHT work... i just kinda went through and coded it really quick... it requires two new variables for the NPC rec... one really isn't necissary you can just make it a public timer if you want, but then they'll all be flapping at the same time or whatever... replace the Code: ' Check for animation and try using this... it's untested... but it should definately be a step in the right direction for you... i think.... haha.... Code: ' Check for animation That would be if you added the "constant" to the npc rec, it would also require you to add "MoveTimer" to the Npc Rec... but that obviously wouldn't need to be saved... let me know how that goes... |