Page 1 of 1

Newbie Asks: Can you do Scaling Animation using GE Scripting

PostPosted: Wed Apr 25, 2012 4:39 am
by ggesterGamePro99
I notice there is a Width and Height variables in GE but
i said WIDTH += 5

and nothing happened.
For example i want some sprite to just scale up and down repeatedly, without image animation..Just do it within Ge scripting.
But it didn't work

is it possible or not? I"m on the Mac version of GE

Re: Newbie Asks: Can you do Scaling Animation using GE Scrip

PostPosted: Wed Apr 25, 2012 5:26 am
by ggesterGamePro99
SO Tudochao has a video tutorial with an example of scaling.

he uses the method
draw_from( "Player", width, height, 2)

where 2 would make the character double the size...i tried 2 and 3, and my character didn't change at all. i tried also changing the previous 2 parameters and they didn't affect my character at all.


So does this method even work on mac?
i'm on mac. but Tudochao's probably not on mac, so i dont know

Re: Newbie Asks: Can you do Scaling Animation using GE Scrip

PostPosted: Wed Apr 25, 2012 3:56 pm
by skydereign
If you watched the tutorial, I'm sure it shows that he is using a canvas actor. draw_from is a canvas only function, which allows you to draw other actors on the canvas with a given scale. Using canvas though can be rather difficult/inefficient, so depending on how you want to scale, it might not be the best thing to do.

Re: Newbie Asks: Can you do Scaling Animation using GE Scrip

PostPosted: Wed Apr 25, 2012 4:01 pm
by ggesterGamePro99
Oh ok.. I"ll just stick to doing the scaling animation in my 3d program where i make the animations.
thanks

Re: Newbie Asks: Can you do Scaling Animation using GE Scrip

PostPosted: Sun Oct 20, 2013 11:31 pm
by 247wkman
i have similar interest in scaling actors for depth etc. the examples here:
viewtopic.php?f=2&t=9427&p=93068#p93068 have helped me learn alot how canvas can work and am far far from finishing my explorations.

i played with an example 'zoom' and learned how to scale actors while preserving persistance in their animations and gave them scale origins at creation and scale limets.
i'm posistive you can tell it to scale up on creation to desired value, then let that value be an event to scale back down and min scale value event back up agian.
the scale transisions will occur in draw events- just look at my version: simply use the script in the press up key/down key events. but instead of using a key event, just paste it in a draw event and it should do it for each re-draw on its own. (like a pulsating effect?) will require scripting the met value events to complete this. i can only trial and error off what i've done so far.