Road decoration
Moderator: Plugin Moderators
Re: Road decoration
Hello guys, anyone remember the road barrier plugin? Not sure if Lobby or Commander made it. But can it work as a road deco? or it would remain as an on click fun plugin?
- Lakan Haraya
- Metropolitan
- Reactions:
- Posts: 131
- Joined: 28 Mar 2019, 09:34
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Hi
How can I create a rotation aware road deco for frame 5 and 10 (straight road) of the road, because rotation 0 (default) and 2 build the same road deco :/ and I don't want it into my plugin
Hmm...
How can I create a rotation aware road deco for frame 5 and 10 (straight road) of the road, because rotation 0 (default) and 2 build the same road deco :/ and I don't want it into my plugin
Hmm...
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Have you tried making the animation used for those frames "rotation aware"?
Re: Road decoration
Excuse me, why road decoration can't be put on the railway?
- JustAnyone
- Developer
- Reactions:
- Posts: 3479
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Road decoration
controls it
Re: Road decoration
thank you!
- Lakan Haraya
- Metropolitan
- Reactions:
- Posts: 131
- Joined: 28 Mar 2019, 09:34
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Would it be possible to support road deco in slopes in the near future?
- CERRERA
- Townsman
- Reactions:
- Posts: 48
- Joined: 25 Jan 2020, 06:19
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Road decoration
Is there a code for animation that is active when the car steps in the road decoration
- CERRERA
- Townsman
- Reactions:
- Posts: 48
- Joined: 25 Jan 2020, 06:19
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Road decoration
Tutorials for 64 frames of road deco
- Pederont
- Small-town resident
- Reactions:
- Posts: 25
- Joined: 10 Aug 2019, 09:01
- Location: South Korea
- Plugins: Showcase Store
- Contact:
-
Plugin Creator
Platform
Re: Road decoration
Is it possible to make road deco react when vehicle is on the tile? just like military checkpoint.
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
You could try a fun using "road usage" in the condition statement. Keep in mind that it probably includes all levels of road at that tile: road, bridge(s), and tunnel.
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
That's cool!
- ian`
- Supporter
- Reactions:
- Posts: 117
- Joined: 04 Apr 2020, 17:36
- Location: Indonesien
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
The code looks like this :
Code: Select all Reset
local lastCounterRight = Array{0, 0, 0} local lastCounterLeft = Array{0, 0, 0} local timer = 0 local x,y,level local isTrainOnTheTrack = false function script:update() if City.countRoads(Draft.getDraft'$road_barrier_open00') > 0 then x,y,level = City.getRoad(1, Draft.getDraft'$road_barrier_open00') elseif City.countRoads(Draft.getDraft'$road_barrier_closed00') > 0 then x,y,level = City.getRoad(1, Draft.getDraft'$road_barrier_closed00') end if timer == 0 then lastCounterRight[1] = Tile.getRoadCarCount(x+4, y+1, level) lastCounterRight[2] = Tile.getRoadCarCount(x+3, y+1, level) lastCounterRight[3] = Tile.getRoadCarCount(x+5, y+1, level) lastCounterLeft[1] = Tile.getRoadCarCount(x-4, y+1, level) lastCounterLeft[2] = Tile.getRoadCarCount(x-3, y+1, level) lastCounterLeft[3] = Tile.getRoadCarCount(x-5, y+1, level) Builder.buildRoad(Draft.getDraft'$road_barrier_open00',x,y,x,y) isTrainOnTheTrack = false timer = 1 elseif timer > 250 then lastCounterRight[1] = Tile.getRoadCarCount(x+4, y+1, level) lastCounterRight[2] = Tile.getRoadCarCount(x+3, y+1, level) lastCounterRight[3] = Tile.getRoadCarCount(x+5, y+1, level) lastCounterLeft[1] = Tile.getRoadCarCount(x-4, y+1, level) lastCounterLeft[2] = Tile.getRoadCarCount(x-3, y+1, level) lastCounterLeft[3] = Tile.getRoadCarCount(x-5, y+1, level) Builder.buildRoad(Draft.getDraft'$road_barrier_open00',x,y,x,y) isTrainOnTheTrack = false timer = 0 elseif timer > 1 then Builder.buildRoad(Draft.getDraft'$road_barrier_closed00',x,y,x,y) end if Tile.getRoadCarCount(x+4, y+1, level) ~= lastCounterRight[1] then if isTrainOnTheTrack then isTrainOnTheTrack = false end if not isTrainOnTheTrack and Tile.getRoadCarCount(x+3, y+1, level) ~= lastCounterRight[2] then timer = timer + 1 isTrainOnTheTrack = true if isTrainOnTheTrack then if Tile.getRoadCarCount(x-3, y+1, level) ~= lastCounterLeft[2] then if Tile.getRoadCarCount(x-4, y+1, level) ~= lastCounterLeft[1] then timer = 0 end end end elseif isTrainOnTheTrack and Tile.getRoadCarCount(x+5, y+1, level) ~= lastCounterRight[3] then isTrainOnTheTrack = false timer = 0 end elseif Tile.getRoadCarCount(x-4, y+1, level) ~= lastCounterLeft[1] then if isTrainOnTheTrack then isTrainOnTheTrack = false end if not isTrainOnTheTrack and Tile.getRoadCarCount(x-3, y+1, level) ~= lastCounterLeft[2] then timer = timer + 1 isTrainOnTheTrack = true if isTrainOnTheTrack then if Tile.getRoadCarCount(x+3, y+1, level) ~= lastCounterRight[2] then if Tile.getRoadCarCount(x+4, y+1, level) ~= lastCounterRight[1] then timer = 0 end end end elseif isTrainOnTheTrack and Tile.getRoadCarCount(x-5, y+1, level) ~= lastCounterLeft[3] then isTrainOnTheTrack = false timer = 0 end end end
Interactive Lua editor
- CommanderABab
- AB
- Reactions:
- Posts: 11107
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Add to the lit at night part.
Code: Select all
"light": true,
"light switching":true
- THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4314
- Joined: 14 Sep 2017, 17:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Road decoration
Does someone have the json + the textures of the lamp post & the night animation of the lamp post so i can see how those are made ?