Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: qqplayer on January 17, 2017, 06:25:45 AM

Title: Wher can I find all animations properties?
Post by: qqplayer on January 17, 2017, 06:25:45 AM
I´m testing some animations , and want to know the "complete property list" that can be used.

I saw , property x , property scale ...

Where can I find more info about this? , thanks
Title: Re: Wher can I find all animations properties?
Post by: jedione on January 17, 2017, 07:08:48 AM
check out the "Sample Animate" layout

their is a lot their....including sprites..and rotating objects
Title: Re: Wher can I find all animations properties?
Post by: qqplayer on January 17, 2017, 01:24:11 PM
I found some interesting thing.
I want to rotate my sega cds on my layout.
This is what I made.

Code: [Select]
animation.add( PropertyAnimation( OBJECTS.cdart, PropertyAnimations.rotate_right_90 ) );
How can I add an infinite movement or a loop to this animation?
Thanks.
Title: Re: Wher can I find all animations properties?
Post by: liquid8d on January 17, 2017, 03:56:57 PM
hi qqplayer,

open up the animate.nut file in the modules folder - it explains all functions. Any property can be animated that is a number..

Look at all object properties here:

https://github.com/mickelson/attract/blob/master/Layouts.md
Title: Re: Wher can I find all animations properties?
Post by: qqplayer on January 18, 2017, 09:16:21 AM
Ok finally solved.
I´m going to share my code to anyone who wants to add a spinning cd:

Code: [Select]
//////////////////////////////////////

// ANIMATION CDART PRESERVE ASPECT RATIO

//////////////////////////////////////

local cdart = fe.add_artwork("cdart", flx*0, fly*0.27 flw*0.19, flh*0.25);
cdart.preserve_aspect_ratio = true;

local cdart_rotation = {
    when = Transition.ToNewSelection ,property = "rotation", start = 0, end = 360, time = 3000, loop = true
 }

 //Animation
 
 animation.add( PropertyAnimation( cdart, cdart_rotation ) );