Set Scale/Alpha Problems
BlitzMax Forums/BlitzMax Beginners Area/Set Scale/Alpha Problems
| ||
Hi All, Please bear with me, as I'm very new to BM (enjoying learning, however!) I'm trying to have an image scale in from nothing to it's full size and then hold there for a bit (rotating whilst it moves in) (Imagine those old fashioned newsflash thingies on films where the paper 'twirls' towards the camera.) I've got the image to be displayed, and rotate, but how do I scale it up from 0 to 1 using set scale? Everytime I try, it just 'appears' as full size. I realise I need to do some 'delay / timing' work here to get it to work correctly but have no idea where to start. Many thanks, and looking forward to having a lot of fun with my new purchase! ;) M. |
| ||
Something like (untested):Local scale:Float = 0 Local angle:Float = 0 Local img:tImage = LoadImage("pic.png") Repeat scale:+0.01 If scale > 1 then scale = 1 angle:+10 angle = angle Mod 360 SetScale scale,scale SetRotation Angle DrawImage img,x,y Flip Until scale >= 1 |
| ||
Cheers GfK will give it a try. ;) M |
| ||
A little bit of tweaking and fiddling and got that to work fine... Cheers man! M. |