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: IsAnimPlaying and 2Dactor. Is this possible?  (Read 2451 times)

0 Members and 1 Guest are viewing this topic.

diegoquarantine

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • View Profile
    • Buenos Aires Quarantine Studio
IsAnimPlaying and 2Dactor. Is this possible?
« on: February 28, 2013, 08:53:10 PM »


Hi, I need if my 2D actor is playing an anim in order to load a transition between anims or not. I read that the method "IsAnimPlaying" is intended for this, but apparently is only for 3D actors.
Is there another method of similar function or another way around this?.
Thanks!

ciberspace

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 116
    • View Profile
    • Tele Juego
Re: IsAnimPlaying and 2Dactor. Is this possible?
« Reply #1 on: March 01, 2013, 08:10:34 AM »

you can be used:
Ready (read only) Returns whether the object isn't currently performing any action. 

appaul

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: IsAnimPlaying and 2Dactor. Is this possible?
« Reply #2 on: March 03, 2013, 08:22:00 PM »

Or you can get the sprite of the actor, so you can check its animation properties:
Code: [Select]
var actorAnim = actor.GetSpriteObject();
 
if (actorAnim.Finished)
if (actorAnim.CurrentFrame == ...)
etc...
Logged

diegoquarantine

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 50
    • View Profile
    • Buenos Aires Quarantine Studio
Re: IsAnimPlaying and 2Dactor. Is this possible?
« Reply #3 on: March 14, 2013, 05:22:06 AM »



 Oh yeah, I didn´t thought of that. This will help a lot. Thanks.
 

Page created in 0.025 seconds with 23 queries.