Prison Architect

Prison Architect

Which side do you sit on?
Brutal Punishment or noble attempts to reform? From the Panopticon to the Supermax, this is your chance to publish or subscribe to the best prisons from the Architect community.
can't get the scripted property
I want to turn off the scripted property for prisoners. the code works but whenever I try to get the game's default scripted property. the variable doesn't show up in the debugger even though the variable doesn't return an error. the only thing that returns an error is the line I added to get it to return to the debug menu.

function Create()
g=0
joe=Object.GetProperty("Scripted")
bob=Object.GetMaterial( 77, 62 )
if bob=="BrickWall"
then
a1()
else
Object.SetProperty("Scripted",false )
joeann=Object.GetProperty("Scripted")
Gang.id=dontarguewithme
end
end
Last edited by edumacacion; 12 Dec, 2019 @ 12:58pm
< >
Showing 1-1 of 1 comments
edumacacion 11 12 Dec, 2019 @ 2:01pm 
I just did a test after the first group of prisoners came by the debug console went off showing that the code had been run and when the second group of prisoners came by the debug console came on so whatever the game thinks scripted is either isn't the property in materials or the part of the documentation that says that by default the object the property is set for is the object the code is run on is only correct when written like this.GetProperty("Scripted") but I really wanted this to have global scope if that's possible. there is the remove script function in Campaign but I want to be able to run this from the object. Problem solved. Game.AttachScript is called from the campaign. in sandbox mode it won't be active. well at least maybe this can help some people. Unlocking variables that run across objects has got to be useful. never mind game.attachscript just adds a script to the campaign
Last edited by edumacacion; 12 Dec, 2019 @ 2:40pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50