Newbie Asks: Can you do Scaling Animation using GE Scripting

Non-platform specific questions.

Newbie Asks: Can you do Scaling Animation using GE Scripting

Postby ggesterGamePro99 » Wed Apr 25, 2012 4:39 am

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
ggesterGamePro99
 
Posts: 44
Joined: Mon Apr 16, 2012 1:53 am
Score: 0 Give a positive score

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

Postby ggesterGamePro99 » Wed Apr 25, 2012 5:26 am

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
ggesterGamePro99
 
Posts: 44
Joined: Mon Apr 16, 2012 1:53 am
Score: 0 Give a positive score

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

Postby skydereign » Wed Apr 25, 2012 3:56 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

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

Postby ggesterGamePro99 » Wed Apr 25, 2012 4:01 pm

Oh ok.. I"ll just stick to doing the scaling animation in my 3d program where i make the animations.
thanks
ggesterGamePro99
 
Posts: 44
Joined: Mon Apr 16, 2012 1:53 am
Score: 0 Give a positive score

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

Postby 247wkman » Sun Oct 20, 2013 11:31 pm

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.
247wkman
 
Posts: 67
Joined: Mon Dec 13, 2010 3:55 pm
Score: 3 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron