Animations

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Animations

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
tutorial2.png

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
Hope I didn't mess up with anything, if I did, notify me down there \/ :)
You do not have the required permissions to view the files attached to this post.
get yoked!!
User avatar
Bearbear76
Inhabitant of a Multiverse
Reactions:
Posts: 5701
Joined: 10 Feb 2017, 12:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Animations

Post by Bearbear76 »

Nice tutorial :)
Just my opinion
retired
y
yusuf8a684
Reactions:

Re: Animations

Post by yusuf8a684 »

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

Plugin Creator

Platform

Re: Animations

Post by RayXP »

Same...
🇺🇸
☆ HEAD ADMIN OF TTRP ☆
Romans 5:1 ✝️
Make America Great Again!!
📍 Pearland, TX 🇺🇸
N
Nifaroux
Villager
Reactions:
Posts: 18
Joined: 10 Jan 2022, 03:07

Re: Animations

Post by Nifaroux »

thank you i understood perfectly
Previous topicNext topic