Animation Initialization

edited June 2012 in Help request
Sup guys, so I've been making quite a few little fluff games to keep drilling the process of coding on this engine into my head. And regardless of how many times I make a quick game I have issues with making the animation start, when using the event handler recommended in the tuts I always get "Animation has Stopped" before it even gets a chance to initialize, any tips on animation debugging and common mistakes would be very welcome. :laugh:

(edit: idk if it clarifies to my more specific question at hand of dealing with "Animation has Stopped" but I do get the entire sprite sheet I have created to show up , just not the TextureCorner's, in animation)

Comments

  • edited June 2012
    Mmh, no real tips beside re-checking your anim config data.

    We can had extra pairs of eyes if you post your config here too. :)
  • edited June 2012
    Hey thx Iarwain, I've already implemented several levels in the actual C++ half of the quick little game but the in's and out's of the ini syntax are still alluding me a little bit. I'll go ahead and post the config below , I haven't set texture corners but they should have atleast gone to the bottom left sprite as I take it from the Animation tutorials. And again thanks a bunch for anyone willing to look at this and point me in the right direction. :cheer:

    http://pastebin.com/2pZ0CVm8
  • edited June 2012
    You need to define links between animations for the animation graph to be complete (and operational). :)

    As for the frames you've defined, they should all be 125x125 beginning at the top left corner (0, 0), from what I can see.
  • edited June 2012
    Ah yes, also if you have frames with no duration set, the duration used will be 0!

    You might want to define the default key duration for your anim, that will be applied to all the keys that don't have a specific duration.

    I'm in the process of changing all this and trying to make something much more user friendly. Right now declaring animations is a huge choir. Working on it! :)
  • edited June 2012
    Oh alright,did not know that the linklist was a requirement, just thought it was for smoother animating (which i didn't care for at that moment). And also the "origin" of the sprite sheet is the top left and the coordinates are all positive based correct?

    Whoo, animations are working and look not too bad, linklist was all i needed, thx Iarwain. :cheer:
  • edited June 2012
    Nice, glad you got it sorted out! :)
  • edited June 2012
    Didn't feel like starting a new thread for this and I could solve this before anyone gets a chance to answer it, but is there such a thing in the c++ portion of orx to detect a key depress and set an animation from there?
  • edited July 2012
    You can test the state of a key via the orxKeyboard API, but I'd recommend using the orxInput API instead as it allows you to easily bind and rebind inputs to peripherals (keyboard, joystick, mouse, ...) and you can, in addition to testing their state, be notified when they change via events, or even trigger them manually (which is nice for tutorials or for bots, for example).
  • edited July 2012
    Ok so if I understand you right I'd just implement this "orxINPUT_EVENT_OFF" into say an If statement for example.

    edit: well I got what I achieved not by means of the orxINPUT api but simply a null else statement, but muchas gracias for the assist. :lol:
  • edited July 2012
    As long as you found a way that worked for you! :)

    But for the records: (!orxInput_IsActive("MyInput") && orxInput_HasNewStatus("MyInput")) means the input just got deactivated this frame. :)
  • edited July 2012
    Hey awesome theres actually another instance I could totally use that for a different part.Thanks for the tip , very useful.
Sign In or Register to comment.