getFrameNr for Last Frame with ISceneNodeAnimator

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
peacerosetx
Posts: 51
Joined: Fri Jan 11, 2008 3:21 am
Location: Fort Worth, Texas

getFrameNr for Last Frame with ISceneNodeAnimator

Post by peacerosetx »

Greetings all,

Peace. I have a problem and need some help. What I am trying to do is to call getFrameNr() , and getEndFrame() in an if statement to determine when both numbers are the same so that I can call a different method. What happens is that the numbers are continually the same –1.


Do you think that it does not work because I load my textures with an ISceneNodeAnimator in the following way:
scene::ISceneNodeAnimator* ScreenAnimator = m_pSceneManager->createTextureAnimator(adventureOneTexture,4000, false);
To solve the problem I have (a) read through the forums on as many threads that seemed relevant that addressed “getFrameNr()and getEndFrame(), ” (b) re-did how I pased in the IanimatedMeshSceneNode, and (c) looked at sample code that hd somewhat of a similar use.


Following is the code for how I have set it up:

For the creation of the texture


Code: Select all

  // load textures
 irr::core::array<irr::video::ITexture*> adventureOneTexture;

adventureOneTexture.push_back(m_pDriver->getTexture("../../media/adventureOneImage2.jpg"));
adventureOneTexture.push_back(m_pDriver->getTexture("../../media/adventureOneImage3.jpg"));

etc…



I read there was a class for call back, but prefer to use this method. Thank you for any help.

Peace. :?
___Trusting in the Lord
peacerosetx
Posts: 51
Joined: Fri Jan 11, 2008 3:21 am
Location: Fort Worth, Texas

Post by peacerosetx »

Well I think that I might have figured this out. It appears-- from other code that I have re-reviewed, that the calls to retreive the frame number is within a while loop, or an update function. My is not. As soon as I re-adjust the code, I'll report any progress should any one else have the same issues. :shock:
___Trusting in the Lord
Post Reply