Jump to content


Photo

sprite size


  • Please log in to reply
4 replies to this topic

#1 doggyman

doggyman

    GMC Member

  • GMC Member
  • 101 posts
  • Version:Unknown

Posted 11 December 2011 - 08:19 PM

Hello everyone,
Here is my problem :

Well, maybe it sounds noob, but
I want to make a piece of code where I can change the scale of the object's sprite.
If it is possible, I want it to change over x seconds, not having to make it scaling 2.0, 1.9, 1.8, 1.7, 1.6, etc...

thanks for answering back
see ya ;)
  • 0

#2 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 1284 posts
  • Version:GM:Studio

Posted 11 December 2011 - 08:46 PM


if image_xscale > 0 image_xscale -= 0.01; 

if image_yscale > 0 image_yscale -= 0.01


  • 0

#3 doggyman

doggyman

    GMC Member

  • GMC Member
  • 101 posts
  • Version:Unknown

Posted 11 December 2011 - 08:55 PM

Well, it's not what I need, also it doesn't work.
I also forget to tell somes informations :

When Created, the sprite size instantly change to 2.0
then, over 0.8 seconds, it becomes smaller to get back to 1.0

thanks again for answering


Ps : I have another question :
Another object, I want it to appear (I don't know what is the word in english) gradually invisible to its normal sprite.
once again, over 1.0 second please.

thanks again
  • 0

#4 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 1284 posts
  • Version:GM:Studio

Posted 11 December 2011 - 09:16 PM

first set image_alpha = 0
then:
If image_alpha < 1 image-alpha += 0.01

The first code should have worked fine... :confused:
  • 0

#5 doggyman

doggyman

    GMC Member

  • GMC Member
  • 101 posts
  • Version:Unknown

Posted 11 December 2011 - 09:25 PM

ok, I saw the problem :
I've put all these action in the create event.
instead of the step event

thanks^^
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users