Animation problem
Moderators: Scenario Moderators, Plugin Moderators
Animation problem
I were trying to make a walls through animation system, but the animation divided on two SAME frames, not two different.
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Animation problem
You can set different animations for different frames:
You could also use this (which is supposed to do the same thing but I haven't tested it):
In your case you could write something like this (I used the first method as it's easier to copy and paste
):
Also, when posting code don't upload images instead post the text inside [сode][/code], it's easier for us to look at it.
I couldn't figure out how to combine the animation and select a specific animation frame though. Someone has to help me there (if it's possible).
Code: Select all
"frames": [{...}], // 2 frames in here
"animation": [
{"id": "$example_animation1", "frame": 0}, // This animation is only displayed for the first frame
{"id": "$example_animation2", "frame": 1} // This animation is only displayed for the second frame
]
Code: Select all
"frames": [{...}], // 2 frames in here
"animation": [
{"id": "$example_animation1"},
{"id": "$example_animation2"}
],
"frame animation indicies": [
[0], // Use the first animation (i.e. $example_animation1) for the first frame
[1] // Use the second animation (i.e. $example_animation2) for the second frame
]

Code: Select all
[
{
"id": "$modpanel_animation1",
"type": "animation",
"frames": [
{"bmp": "wall1.png", "x": 0, "w": 16}
]
},
{
"id": "$modpanel_animation2",
"type": "animation",
"frames": [
{"bmp": "wall1.png", "x": 16, "w": 16}
]
},
{
"id": "$modpanel_example",
"type": "fence",
"category": "$modpanelcat01",
"frames": [
{"bmp": "wall1.png", "w": 16, "handle y": 8, "count": 2}
],
"animation": [
{"id": "$modpanel_animation1", "frame": 0, "y": -14},
{"id": "$modpanel_animation1", "frame": 0, "y": -20},
{"id": "$modpanel_animation1", "frame": 0, "y": -26},
{"id": "$modpanel_animation2", "frame": 1, "y": -14},
{"id": "$modpanel_animation2", "frame": 1, "y": -20},
{"id": "$modpanel_animation2", "frame": 1, "y": -26}
]
}]

I couldn't figure out how to combine the animation and select a specific animation frame though. Someone has to help me there (if it's possible).

Code: Select all
[{
"id": "$modpanel_animation",
"type": "animation",
"frames": [
{"bmp": "wall1.png", "w": 16, "count": 2}
]
},
{
...
"animation": [
{"id": "$modpanel_animation", <get the first frame of the animation>, "frame": 0, "y": -14},
...
{"id": "$modpanel_animation", <get the second frame of the animation>, "frame": 1, "y": -14},
...
]
}]
Re: Animation problem
It really worked! Thanks!
But i have one small issue with animation. That white things ain't the part of animation, but they somehow appears.
But i have one small issue with animation. That white things ain't the part of animation, but they somehow appears.
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Animation problem
It's hard to figure out what's wrong without the JSON. Please post it here (just for that specific wall + animations).

Re: Animation problem
That's animations
And that's for wall
Code: Select all
{
"type": "animation",
"id": "WALL11MID",
"frames": [{"bmp": "WALL11MID.png","h":16,"w":16}]
},
{
"type": "animation",
"id": "WALL11TOP",
"frames": [{"bmp": "WALL11TOP.png","h":16,"w":16}]
},
{
"type": "animation",
"id": "WALL11MIDR",
"frames": [{"bmp": "WALL11MID.png","h":16,"w":16,"x":16}]
},
{
"type": "animation",
"id": "WALL11TOPR",
"frames": [{"bmp": "WALL11TOP.png","h":16,"w":16,"x":16}]
}
Code: Select all
{
"id": "$modpanelwall722",
"title":"wall 11",
"type": "fence",
"category":"$modpanelcat10",
"frames": [
{"bmp":"WALL11BASE.png", "h":16,"w":16,"count":2,"handle y": 5}
],
"price": 100,
"animation":
[
{"id": "WALL11MID", "frame":0, "x": 0, "y": -11},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -11},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -17},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -17},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -23},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -23},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -29},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -29},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -35},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -35},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -41},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -41},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -47},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -47},
{"id": "WALL11MID", "frame":0, "x": 0, "y": -53},
{"id": "WALL11MIDR", "frame":1, "x": 0, "y": -53},
{"id": "WALL6TOP", "frame":0, "x": 0, "y": -59},
{"id": "WALL6TOPR", "frame":1, "x": 0, "y": -59}
]
}
Re: Animation problem
UPD:
I just set h:13 instead of h:16 and it worked!
I just set h:13 instead of h:16 and it worked!
- ETTOfficial
- Inhabitant of a Megacity
- Posts: 296
- Joined: 23 Oct 2021, 08:09
- Location: Philippines
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Animation problem
That's a pretty good plugin! I might have just used it for making custom buildings.
Can you make some more modulable plugins like this?
Can you make some more modulable plugins like this?
Re: Animation problem
There will be a plugin about service buildings, it's on checking nowTheOfficialLSC wrote: ↑23 Oct 2022, 08:52That's a pretty good plugin! I might have just used it for making custom buildings.
Can you make some more modulable plugins like this?