How does pos works?
Moderators: Plugin Moderators, Scenario Moderators
How does pos works?
how does pos works?
I tried to add night texture to a vehicle but;
-Night animation was always on all day and night
-Animation was spinning
+At least it was fitting to it's place
I can give the plugin file to the trusted ones to test it or help me. It has a special code in it, that's why I can't put it here
I tried to add night texture to a vehicle but;
-Night animation was always on all day and night
-Animation was spinning
+At least it was fitting to it's place
I can give the plugin file to the trusted ones to test it or help me. It has a special code in it, that's why I can't put it here
- JustAnyone
- Developer
- Posts: 3595
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: How does pos works?
My, as an expert, reply - how it works I do not know. All I know is that it works and that you'll need a lot of trial and error.
- CommanderABab
- AB
- Posts: 11264
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: How does pos works?
Code: Select all
{"id":"$abbcwhite00", //defining the animations
"type":"animation",
"light":true,
"light switching":false,
"frames":[ {"bmp":"whitepixel.png"}, {"bmp":"whitepixel.png"}, {"bmp":"whitepixel.png"}, {"bmp":"whitepixel.png"} ],
"v2":true
},
{"id":"$abbcred00",
"type":"animation",
"light":true,
"light switching":false,
"frames":[ {"bmp":"redpixel.png"}, {"bmp":"redpixel.png"}, {"bmp":"redpixel.png"}, {"bmp":"redpixel.png"} ],
"v2":true
},
{
"id":"$bcanimationcalltemplate00", //template of everything but the frames for each of three cars
"type":"template",
"animation": [// the pos numbers here are not all correct :/
{
"id": "$abbcwhite00",
"pos": [10, 8, 11, -3, 1, 0, 1, 3], //xy pos of the light
"frames": [0, 3] //which frames of the car this applies to
},
{
"id": "$abbcwhite00",
"pos": [15, 2, 15, 0, 6, -2, 5, 5],
"frames": [0, 3]
},
{
"id": "$abbcred00",
"pos": [1, -6, 11, -4, 12, -2, 11, 9],
"frames": [1, 2]
},
{
"id": "$abbcred00",
"pos": [6, -9, 5, -2, 15, -4, 15, -7],
"frames": [1, 2]
}
],
"capacity":10,
"flag normal":true,
"flag user2":true,
"speed":0.5,
"v2":true
},
{
"id":"$bigcomcarplugin00", // using the template in the cars
"type":"car",
"frames":[
{"bmp":"bigcomcars.png","w":15,"h":10,"count":4}
],
"template":"$bcanimationcalltemplate00"
} ,
{
"id":"$bigrescarplugin00",
"type":"car",
"frames":[
{"bmp":"bigrescars.png","w":15,"h":10,"count":4}
],
"template":"$bcanimationcalltemplate00"
} ,
{
"id":"$bigindcarplugin00",
"type":"car",
"frames":[
{"bmp":"bigindustcars.png","w":15,"h":10,"count":4}
],
"template":"$bcanimationcalltemplate00"
} ,
Code: Select all
"pos": [15, 2, 15, 0, 6, -2, 5, 5],
"frames": [0, 3]
- CommanderABab
- AB
- Posts: 11264
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: How does pos works?
Remember, they are not all in the right place. :/
And it's hard to debug, when they are all moving around.
And it's hard to debug, when they are all moving around.

Re: How does pos works?
I used the code you gave me but it didn't work
This is how it is like
Code: Select all
...{
"frames": [
{
"bmp": "TCDD_modern_suburban_nightA.png"
},
{
"bmp": "TCDD_modern_suburban_nightB.png"
},
{
"bmp": "TCDD_modern_suburban_nightC.png"
},
{
"bmp": "TCDD_modern_suburban_nightD.png"
}
],
"id": "$TCDD_modern_suburban_night",
"type": "animation",
"light": true,
"light switching": false,
"v2": true
},
{
"animation": [
{
"id": "$TCDD_modern_suburban_night",
"pos": [
0,
0,
0,
0,
0,
0,
0,
0
],
"frames": [
0
]
},
{
"id": "$TCDD_modern_suburban_night",
"pos": [
0,
0,
0,
0,
0,
0,
0,
0
],
"frames": [
1
]
},
{
"id": "$TCDD_modern_suburban_night",
"pos": [
0,
0,
0,
0,
0,
0,
0,
0
],
"frames": [
2
]
},
{
"id": "$TCDD_modern_suburban_night",
"pos": [
0,
0,
0,
0,
0,
0,
0,
0
],
"frames": [
3
]
}
],
"id": "$TCDD_modern_suburban_night_template",
"type": "template",
"flag normal": false,
"flag train": true,
"v2": true,
"capacity": 10,
"speed": 1
},
{
"author": "yusuf8a684",
"frames": [
{
"bmp": "TCDD_modern_suburban.png",
"count": 4,
"h": 19,
"w": 20
}
],
"id": "TCDD_modern_suburban_vagon",
"type": "car",
"template": "$TCDD_modern_suburban_night_template",
"flag normal": false,
"flag train": true,
"v2": true
}...
- CommanderABab
- AB
- Posts: 11264
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: How does pos works?
That's because multiple frames in one animation definition are all drawn in the order given.
You should just provide one side for four animations, then call those as required.
You should just provide one side for four animations, then call those as required.
Re: How does pos works?
Oh, soo I need to write own templates for each animation. Thanks for help ABab 

- CommanderABab
- AB
- Posts: 11264
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: How does pos works?
Put "light switching":true if you just want them to show at night.
Re: How does pos works?
Every animation is fitting now! Thanks again but I made all light switching true but lights are open all day and night still