Page 1 of 2
Custom animations
Posted: 17 Jun 2018, 22:22
by FranchuFranchu
Since KoalaGuy asked to be deleted, all his posts are gone. One of those posts was about custom animations. So here I am remaking the tutorial
To define your animation:
Code: Select all
[
{
"id":"myanimation",
"frames":[ {
"bmp":"myanim.png"
"move x":5 //In moment number 1,
//our animation will be in x 5
"move y":16 //and in y 16
},{
"bmp":"myanim.png"
"move x":10 //In moment number 2,
//our animation will be in x 10
"move y":16 //and in y 16
}
]
"handle interpolation":5 //5 ticks between
//moment 1 and moment 2
}
]
To use it:
Code: Select all
[
{
"id":"buildingwithanimation",
"type":"decoration",
"width":1,
"height":1,
"frames":[{"bmp":"basepart.png"}],
"animation":[
{"id":"myanimation"}
]
}
]
I hope I didn't mess up with anything
Re: The ACTUAL tutorial on custom animations
Posted: 24 Jun 2018, 15:30
by dom.stephen
How is x and y defined?
Re: The ACTUAL tutorial on custom animations
Posted: 24 Jun 2018, 16:34
by FranchuFranchu
You mean "move x" and "move y" or "x" and "y"?
Re: The ACTUAL tutorial on custom animations
Posted: 24 Jun 2018, 16:48
by dom.stephen
Both? I'm clueless to animations
Re: The ACTUAL tutorial on custom animations
Posted: 24 Jun 2018, 21:58
by FranchuFranchu
"x" and "y" select a certain part of a image. For example
Code: Select all
"frames":[{
"bmp":"file.png",
"x": 20,
"y":40,
"w": 30,
"h":50
}]
will use a 30×50 rectangle starting at point 20,40 of file.png and set it as the building's frame. You don't to use them in animations. You can use them in any building
"move x" and "move y" are for animations. They set the position of the animation in a specific moment
In the first example of this topic, I made the animation go from (5,16) to (10,16)
Re: Custom animations
Posted: 18 Oct 2018, 16:53
by -LeoLeo-
I know we can put animations on roads, but....
Can it like... be tile dependent?
like frame 1-16 each have different animations, is that possible??
If so, can I have an example???
Re: Custom animations
Posted: 18 Oct 2018, 17:37
by CommanderABab
Yes it is.
Search Red Box Road
Re: Custom animations
Posted: 18 Oct 2018, 17:41
by CommanderABab
Re: Custom animations
Posted: 18 Oct 2018, 17:51
by CommanderABab
Re: Custom animations
Posted: 18 Oct 2018, 18:35
by -LeoLeo-
Thank you so much, Commander!!
Man, this is gonna be a blast!
Edit : I've now successfully spilled my drinks all over the table after looking at the code
Re: Custom animations
Posted: 18 Oct 2018, 18:55
by -LeoLeo-
@CommanderABab
Okay, let me check...
You took the pictures, made them into parks (+ animation), steal those parks textures and make those into animation themselves, took those textures and uses them as BG/FG animation for the road... right?
Wow.....
Re: Custom animations
Posted: 18 Oct 2018, 19:10
by CommanderABab
-LeoLeo- wrote: ↑18 Oct 2018, 18:55
@CommanderABab
Okay, let me check...
You took the pictures, made them into parks (+ animation), steal those parks textures and make those into animation themselves, took those textures and uses them as BG/FG animation for the road... right?
Wow.....
Yep. Putting them into parks for storage was to save plugin space. It isn't necessary, you could define textures in the animations themselves. If you wanted 16 different animations though, you have to define each one separately as frames in the animations would cycle through all the frames in it for each road tile.
Re: Custom animations
Posted: 02 Dec 2018, 14:27
by Imran M
Wait, could I make a rocket? Like the one from the missile silo? Because I'm making a space exploration plugin.
Re: Custom animations
Posted: 17 Jan 2019, 12:39
by Between3Characters
Hi franchu. Do i need the animation, like in the smoke types? (Each one frame every corner of a animation's png)
Re: Custom animations
Posted: 29 Mar 2019, 16:51
by MaysaChan
Between3Characters wrote: ↑17 Jan 2019, 12:39
Hi franchu. Do i need the animation, like in the smoke types? (Each one frame every corner of a animation's png)
what is you question again?
Re: Custom animations
Posted: 11 May 2019, 18:36
by CommanderABab
Hidden Content
This board requires you to be registered and logged-in to view hidden content.
Re: Custom animations
Posted: 30 Jul 2019, 20:45
by Imran M
CommanderABab wrote: ↑11 May 2019, 18:36
Hidden Content
This board requires you to be registered and logged-in to view hidden content.
- 36v6c1.jpg (34.95 KiB) Viewed 22913 times
Re: Custom animations
Posted: 20 Mar 2020, 20:07
by Imran M
@FranchuFranchu @Lobby Does this still work?
Re: Custom animations
Posted: 20 Mar 2020, 20:10
by CommanderABab
Yes, it still works.
Re: Custom animations
Posted: 20 Mar 2020, 20:13
by Imran M
Yaaaas! You guys might actually see some rocket stuff going on!! About time too, my plugin was basically clickbait since it released!