#ATTRNUMFRAMES shows 0 for #ASYNCDRAW object

Discuss any general programming issues here
Post Reply
Posts: 111
Joined: Tue Dec 13, 2016 8:39 am
Location: Poland

#ATTRNUMFRAMES shows 0 for #ASYNCDRAW object

Post by peceha » Wed Dec 28, 2016 11:11 pm

Hi, I have a question about following code (sprite gets 4 frames because I can see them later on):

Code: Select all

LoadSprite(1, "myGameHero.gif", {x=0, y=0 ,transparency=#BLACK, width=16, height=16, frames=4})
obj = MoveSprite(1 , 0 , 0 , 100 , 100, {speed=1, animspeed=1, Async = True})
DebugPrint("total frames: "..GetAttribute(#ASYNCDRAW, obj, #ATTRNUMFRAMES))
it shows 0 all the time.
#ATTRTYPE gives 1

Thank you.

User avatar
Posts: 2962
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany

Re: #ATTRNUMFRAMES shows 0 for #ASYNCDRAW object

Post by airsoftsoftwair » Fri Dec 30, 2016 12:08 am

Right, #ATTRNUMFRAMES and #ATTRCURFRAME are currently only implemented for transition effect async draw objects. Async draw objects managed by PlayAnim() or the MoveXXX() currently don't support #ATTRNUMFRAMES and #ATTRCURFRAME.

Post Reply