#ATTRNUMFRAMES shows 0 for #ASYNCDRAW object

Discuss any general programming issues here

#ATTRNUMFRAMES shows 0 for #ASYNCDRAW object

Postby peceha » Thu Dec 29, 2016 12:11 am

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.
peceha
 
Posts: 35
Joined: Tue Dec 13, 2016 9:39 am
Location: Poland

Re: #ATTRNUMFRAMES shows 0 for #ASYNCDRAW object

Postby airsoftsoftwair » Fri Dec 30, 2016 1: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.
User avatar
airsoftsoftwair
 
Posts: 2025
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to General programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron