Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Questions! Mind blown by trying to get scene ifs and nulls to work  (Read 2851 times)

0 Members and 1 Guest are viewing this topic.

jimm84

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • View Profile
    • JD Portfolio

Hello, this is an elaboration on a previous question. I'm having troubles with getting the scene init script to recognize an action.

I have - made an animation work by doing ... on 'lastframe' { boulder.Pause ); so when an object is clicked/item used on it, it plays and stops which is fine until.... I want it to stay on last frame when the scene is new loaded. Every time the scene is loaded the animation reverts back to first frame and I want to stayed on 'lastfame'! I want to set this in the the scene init script but i'm having troubles. It might be worth mentioning that the 'on lastframe' is attached the scene sprite (the boulder) and not Sceneinit

If anyone could help with this I would appreciate their help.

Thanks  :) 
Logged
Hello! :-) Illustration & Animation Portfolio http://jdillustration.jimmsdesign.co.uk/

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Questions! Mind blown by trying to get scene ifs and nulls to work
« Reply #1 on: April 13, 2013, 08:48:31 PM »

Make a second sprite and put just the one last frame for the sprite. Make a global variable in the base.inc file and call it BoulderPaused. Now on the "lastframe", after baulder.Pause, add a line that says BoulderPaused = true; Now when you reload the scene, make it say if BoulderPaused = true, load a sprite with just 1 animation frame, else, load the regular one with the animation.

Let me know if this works.
Logged

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
Re: Questions! Mind blown by trying to get scene ifs and nulls to work
« Reply #2 on: April 13, 2013, 09:56:21 PM »

Maybe the "CurrentFrame" attribute of the Sprite object could help you jimm84.
Logged
 

Page created in 0.041 seconds with 20 queries.