Prison Architect

Prison Architect

Road Sensors
110 kommentarer
阳台门口 16. juni 2021 kl. 8:26 
在你的道路上放置传感器,以检测何时有车辆!

他们就像压力垫,但对道路!

确保在道路大门上方放置两块瓷砖,以便车辆停在上面。

半路传感器只检测一条车道,需要像上面的截图一样放置。

(不过,你不必让两个相邻。)

在您完成远程访问研究后,它们位于实用程序下。
David's Old Acc. 1. aug. 2019 kl. 20:20 
I published a fixed version to the workshop here: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1822431950
KilledJoy 29. apr. 2019 kl. 21:58 
mod is 5 years out of date an multiple posts about a fix an yall still shout "fix your mod" lol
Minty Senior 22. apr. 2019 kl. 15:36 
I just noticed that nobrainer already suggested this same fix back in August 2018.
Minty Senior 28. mar. 2019 kl. 17:04 
If you don't mind getting your hands dirty with a minor script change, I found a fix that does work (I played several game days with the clock speeded up, with no errors and nothing in the debug.txt log).

Go to the user mod folder for the game, which is usually here:
C:\Users\YOUR_NAME\AppData\Local\Introversion\Prison Architect\mods
Find and edit the Road Sensors mod script (mod id 485302724)
mods\485302724\data\scripts\RoadSensor.lua

At the bottom of the script, in the function named Authorised
Replace this line:
return Get( vehicle, "Pos.y" ) - OurY <= Proximity;
with:
return Get( vehicle, "Pos.y" ) - this.Pos.y <= Proximity;

The OurY variable defined further up the script wasn't being preserved (nil value). Someone with a better knowledge of lua scripting would probably know why.
Restart the game for the change to be picked up, mod shouldn't need reactivating.
If the mod creator (Themias) is still around perhaps he can check the fix and post an update.
Wal der Qual 17. mar. 2019 kl. 1:09 
@Kiano why should asking nicely be an option when you can just scream at someone making free content, right?
Kiano Jajino 17. dec. 2018 kl. 0:31 
Creator ! Update your mod !
Karachay 8. dec. 2018 kl. 7:41 
I think themias have a look about the error
Karachay 8. dec. 2018 kl. 7:39 
I have a error too
Dan B 31. aug. 2018 kl. 3:38 
same here for that error
Leo 24. aug. 2018 kl. 4:10 
ScriptSystem Error : (RoadSensor) RUNTIME ERROR : [string "-- vehicle types; add more if desired (reme..."]:84: attempt to perform arithmetic on upvalue 'OurY' (a nil value)
mckzchi 17. aug. 2018 kl. 22:56 
@nobrainer. Thank you. I have changed the script accordingly and it works. Thanks @howmanyhoursdoineedtobeclockwork for offering your help.
Alpatron 15. aug. 2018 kl. 8:37 
@nobrainer
Thank you. I had thought I'd need to reverse engineer the mod myself to get it to work.
nobrainer 15. aug. 2018 kl. 7:13 
Ok. I've managed to fix it by editing the lua script not to use the local variable 'OurY'.

I changed line 84 from:

return Get( vehicle, "Pos.y" ) - OurY <= Proximity;

to:

return Get( vehicle, "Pos.y" ) - this.Pos.y <= Proximity;

Now it works. For some reason the local variables are not initialized when you load the save, but the object coordinates are correctly available to be used in the code functions.

Most likely the same problem exists in the file halfroadsensor.lua with the variables 'OurY' and 'OurX'.
nobrainer 15. aug. 2018 kl. 6:55 
I get the same error as of update 15.
Something like this:
ScriptSystem Error : (RoadSensor) RUNTIME ERROR : [string "-- vehicle types; add more if desired (reme..."]:84: attempt to perform arithmetic on upvalue 'OurY' (a nil value)

I've checked the roadsensor.lua script file and it appears that, at line 84, there's an arithmetic operation performed to determine the proximity of the vehicle:
return Get( vehicle, "Pos.y" ) - OurY <= Proximity;

But acording to the error message, this operation is being called with the value of 'OurY' not being a number but a nil value. Aparently the initialization of this variable, at line 28, is not being done sucessfully:
local OurY = this.Pos.y;

I can understand the error that is happening but I don't have knowledge of the modding API to fix it myself, at least not yet.

Any help is appreciated.
putispawn 14. aug. 2018 kl. 14:28 
if you tell me your mod list we may do
The Stranger 13. aug. 2018 kl. 6:57 
Can we get a fix?
putispawn 11. aug. 2018 kl. 17:41 
seems like they aint gonna answer so maybe mckzchi if you tell what mods your using i may can help becuase it musts be an unponpability with another mod
mckzchi 6. aug. 2018 kl. 20:14 
hello, as of update 15 the road sensors get a script error when loading the game. uninstalling the road sensor and installing them again fixes it. can you fix this?
putispawn 6. aug. 2018 kl. 12:41 
fix please error in script update 15 b
berry 20. nov. 2017 kl. 12:44 
Can't find them n-game
N1A 10. sep. 2017 kl. 11:18 
dont even need this
Navarth 27. aug. 2017 kl. 5:15 
Seem working for me (take 1-2 seconds to detect a vehicles)
It has the same icon of the pressure plate btw
TJ_84 24. juni 2017 kl. 2:32 
I play sandbox without utilities, can you place them somewhere else than utilities?
bongerman85 18. maj 2017 kl. 22:29 
i use to use these on my old account and they use to work. make sure they are correctly hooked up to the servos. my guess is that you arent using the perimeter servos mod which should make this work
PAYSO 13. feb. 2017 kl. 17:27 
DOES NOT WORK!
SirGunar 24. dec. 2016 kl. 23:46 
Looks like a cool mod, but I can't find the sensors in the game.
>OVƎЯS~70P< 22. okt. 2016 kl. 8:11 
Pls, update it to the latest version.
Rio 22. sep. 2016 kl. 10:42 
carnt find them
PlatinumGold 17. juli 2016 kl. 19:42 
This is a very good mod but the problem is that it wont work with murgh's recycling mod, the main recycling desk is replaced with a road sensor.
murgh 7. juli 2016 kl. 12:15 
@ThatSanity prisoners require pressure pads, vehicles require road sensors :)
murgh 7. juli 2016 kl. 12:14 
This mod can work without the use of a sprites.png to save mod space.

Simply use these definitions for the RoadSensor:
Width 5
Height 1
SpriteScale 0.5
BEGIN Sprite x 42 y 4 w 10 h 1 RotateType 0 END

and these for the HalfRoadSensor:

Width 2
Height 1
SpriteScale 0.5
BEGIN Sprite x 42 y 4 w 4 h 1 RotateType 0 END
Barckley 5. feb. 2016 kl. 3:05 
@Themias
Barckley 5. feb. 2016 kl. 3:05 
it works??
FaYaY 29. jan. 2016 kl. 15:10 
Can you update this mod so it works on update 3?
Themias  [ophavsmand] 27. jan. 2016 kl. 17:05 
@Mikado-Senpai It works like a pressure pad, if you've used one before. Connect the sensor to the thing you want to trigger, e.g. door servo. Make sure the sensor is placed in the road like it is in the screenshots above.
Star Sanctioned Dreamer 25. jan. 2016 kl. 20:47 
having a little bit of trouble with this one... Are you supposed to connect the Door Servo TO the Road Sensor or do you have to connect the Road Sensor TO the Door Servo...

Can't seem to get it to work, but i know things like the CCTV cameras and monitors only work if you connect it from the monitor TO the camera, so i was wondering if something like that was happening.
Ardith Prime 5. jan. 2016 kl. 12:40 
yes it does.
azairvine 20. dec. 2015 kl. 22:05 
Does this still work after update 2?
The Odd Fox 5. dec. 2015 kl. 3:06 
Nice mod
Dooster 19. nov. 2015 kl. 13:10 
Works like a dream!
7Infamous 7. nov. 2015 kl. 9:24 
i added this one but where do I find I looked in the objects and utilities but couldnt find them
kingdavis45 30. okt. 2015 kl. 7:08 
@gokberk.yilmaz.ant I found it. it was a different light than the normal one. It turns green when the circuit has power to it and it lets you know if you're getting power. Took me a minute but once you firgure out the layout then it's simple. Someone just needs a video showing you how to do this but it WORKS and WORKS WELL.
Burrito 28. okt. 2015 kl. 12:35 
Farted.
BeanSlinger419 24. okt. 2015 kl. 7:19 
:steamhappy::steamhappy:
BeanSlinger419 24. okt. 2015 kl. 7:19 
awesome now i can no longer have prisoners going out
Geek Girl 22. okt. 2015 kl. 1:54 
Thaks, gokberk.yilmaz.ant
kernel sanders 21. okt. 2015 kl. 8:19 
its in utilities
Geek Girl 21. okt. 2015 kl. 1:34 
I researched all in "Security" and in "objects" dind't have any road sensors. :/
Vaktare 20. okt. 2015 kl. 3:12 
i got it to work it was steam that place the files wrong for some reson