Animations

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Kulche
Pluche
Reactions:
Posts: 1141
Joined: 07 Jun 2017, 20:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Animations

#1

Post by Kulche »

I rewrote the tutorial to make it clearer and easier for others to learn :)


Definition

First, you have to define the animation so you can use it later. Here's how to do so:

Code: Select all

[
	{
	"id":"$tutorial_animation00", //unique id of your animation
	"type":"animation",
	"frames":[{"bmp":"tutorial.png"}, {"bmp":"tutorial2.png"}],
	"speed":2.5 //speed at which will the frames change, 1 is default, the higher the value, the slower it goes
}
]
tutorial.png
tutorial.png (75 Bytes) Viewed 3641 times
tutorial2.png
tutorial2.png (76 Bytes) Viewed 3641 times

Usage

Now, you need to add the actual animation to a building:

Code: Select all

[
	{
	... //rest of the building's code goes here ^
	"animation":[
		{"id":"$tutorial_animation00", //defines which animation will it use
		"x":14, //position of animation on horizontal axis, x:0 is at the leftmost edge, will show the anim close to the center
		"y":-3 //position on vertical axis, x:0 is on the middle of the tile, will show the anim slightly above the center
		}]
}
]
And, that's the result:
yes_you_have_to.png
You have to believe it actualy moves, here's the file if you don't:
KulcheAnimations.zip
(13.76 KiB) Downloaded 162 times
Hope I didn't mess up with anything, if I did, notify me down there \/ :)
User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Animations

#2

Post by Bearbear76 »

Nice tutorial :)
User avatar
yusuf8a684
Reactions:

Re: Animations

#3

Post by yusuf8a684 »

I kinda understand now but not sure :D
User avatar
RayXP
Inhabitant of a Infinity
Reactions:
Posts: 7904
Joined: 17 Nov 2018, 21:49
Location: Pearland, TX
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Animations

#4

Post by RayXP »

Same...
User avatar
Nifaroux
Villager
Reactions:
Posts: 15
Joined: 10 Jan 2022, 05:07

Re: Animations

#5

Post by Nifaroux »

thank you i understood perfectly
Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”