Page 1 of 1

✔One way try

Posted: 14 Nov 2017, 18:28
by 22Alpha
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
}
]

Re: One way try

Posted: 14 Nov 2017, 18:39
by 22Alpha
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 2025 times
owse.png
owse.png (3.66 KiB) Viewed 2025 times
ownw.png
ownw.png (3.65 KiB) Viewed 2025 times
owne.png
owne.png (3.67 KiB) Viewed 2025 times

Re: One way try

Posted: 14 Nov 2017, 18:40
by 22Alpha
@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
}
]

Re: One way try

Posted: 14 Nov 2017, 19:02
by 22Alpha
@CommanderABab , the current problem is in the second reply, the ones with the pictures.

Re: One way try

Posted: 14 Nov 2017, 20:54
by CommanderABab
You used NE twice :)
Screenshot_20171114-132250.jpg

Re: One way try

Posted: 15 Nov 2017, 03:31
by 22Alpha
@CommanderABab , HAHAHAHA silly me! Codes are very tricky. Now that's why! Thanks for your help! I'll upload it in a while.

:bc

Re: One way try

Posted: 15 Nov 2017, 07:24
by CommanderABab
You're welcome.