✔One way try

Plugin specific problems will be solved here.

Moderator: KoalaGuy

Post Reply
User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 393
Joined: Sat Sep 23, 2017 14:29

✔One way try

Post by 22Alpha » Tue Nov 14, 2017 18:28

Hey guys, I tried to make a one-way road using default graphics, but when I loaded the game and about to scroll to the one-way road it crashed.

Here's the code:

Code: Select all

[
{
     "autojoin":false,
     "one way frames":[
			  {"bmp":"owse.png","count":16,"w":32,"h":16},
			  {"bmp":"owne.png","count":16,"w":32,"h":16},
			  {"bmp":"ownw.png","count":16,"w":32,"h":16},
			  {"bmp":"owne.png","count":16,"w":32,"h":16}
			 ],
    "bridge frames":[{"bmp":"bridgeow.png","w":32,"h":48,"count":12}],
    "bridge height":12,
    "traffic lights":[{"bmp":"tfow.png","w":32,"h":32,"count":4}],
    "green phase":3000,
    "yellow phase":500,
	"height":1,
	"id":"one way",
	"level":0,
	"monthly price":3,
	"overrunnable":true,
	"allow bus":true,
	"one way": true,
	"price":250,
	"speed":2.5,
	"requirement":{"requirements":[{"type":"RANK", "data":{"lvl":1}}]},
	"text":"Cars may only drive in one direction on this road type. Use it to control traffic.",
	"title":"One-way Road",
	"type":"road",
	"width":1,
	"flag normal":true
}
]
You
Can't
Save
TheoTown
Alone

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 393
Joined: Sat Sep 23, 2017 14:29

Re: One way try

Post by 22Alpha » Tue Nov 14, 2017 18:39

Well actually, the only thing left that's bothering me is this:
Screenshot_2017-11-15-00-33-31.png
The one way route going south west has an arrow of north east.

Here are the roads:
owsw.png
owsw.png (3.61 KiB) Viewed 200 times
owse.png
owse.png (3.66 KiB) Viewed 200 times
ownw.png
ownw.png (3.65 KiB) Viewed 200 times
owne.png
owne.png (3.67 KiB) Viewed 200 times
You
Can't
Save
TheoTown
Alone

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 393
Joined: Sat Sep 23, 2017 14:29

Re: One way try

Post by 22Alpha » Tue Nov 14, 2017 18:40

@CommanderABab , I added override to the original: This is now just a sample code.

Here's what I'm using right now that does not crash:

Code: Select all

[{
	"author":"22Alpha",
	"autojoin":false,
	"frames":[
			  {"bmp":"owse.png","count":16,"w":32,"h":16},
			  {"bmp":"owne.png","count":16,"w":32,"h":16},
			  {"bmp":"ownw.png","count":16,"w":32,"h":16},
			  {"bmp":"owne.png","count":16,"w":32,"h":16}
			 ],
	"bridge frames":[{"bmp":"bridgeow.png","w":32,"h":48,"count":12}],
    "bridge height":12,
    "traffic lights":[{"bmp":"tfow.png","w":32,"h":32,"count":4}],
    "green phase":3000,
    "yellow phase":500,
	"height":1,
	"id":"$road03",
	"level":0,
	"monthly price":3,
	"overrunnable":true,
	"allow bus":true,
	"one way": true,
	"price":250,
	"speed":2.5,
	"requirement":{"requirements":[{"type":"RANK", "data":{"lvl":1}}]},
	"text":"Cars may only drive in one direction on this road type. Use it to control traffic.",
	"title":"One-way Road",
	"type":"road",
	"width":1,
	"flag normal":true,
	"override":true
}
]
You
Can't
Save
TheoTown
Alone

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 393
Joined: Sat Sep 23, 2017 14:29

Re: One way try

Post by 22Alpha » Tue Nov 14, 2017 19:02

@CommanderABab , the current problem is in the second reply, the ones with the pictures.
You
Can't
Save
TheoTown
Alone

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5082
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: One way try

Post by CommanderABab » Tue Nov 14, 2017 20:54

You used NE twice :)
Screenshot_20171114-132250.jpg
436436Currently using beta 436. 436 What's new? :bf
Level 4 roads!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
22Alpha
Inhabitant of a Conurbation
Reactions:
Posts: 393
Joined: Sat Sep 23, 2017 14:29

Re: One way try

Post by 22Alpha » Wed Nov 15, 2017 3:31

@CommanderABab , HAHAHAHA silly me! Codes are very tricky. Now that's why! Thanks for your help! I'll upload it in a while.

:bc
You
Can't
Save
TheoTown
Alone

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5082
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: One way try

Post by CommanderABab » Wed Nov 15, 2017 7:24

You're welcome.
436436Currently using beta 436. 436 What's new? :bf
Level 4 roads!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests