Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
他们就像压力垫,但对道路!
确保在道路大门上方放置两块瓷砖,以便车辆停在上面。
半路传感器只检测一条车道,需要像上面的截图一样放置。
(不过,你不必让两个相邻。)
在您完成远程访问研究后,它们位于实用程序下。
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.
Thank you. I had thought I'd need to reverse engineer the mod myself to get it to work.
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'.
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.
It has the same icon of the pressure plate btw
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
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.