Can I make an object temporarily unusable?

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
Ghost314
level1
level1
Posts: 24
Joined: Thu Dec 24, 2015 9:23 pm

Can I make an object temporarily unusable?

Postby Ghost314 » Tue Dec 29, 2015 10:24 pm

After finding out that there's no easy way to tell Prison Architect that an object requires a water connection to work, I decided to try and simulate the requirement with scripting. Assuming I can already tell whether or not my object has a working water connection (should be doable with GetNearbyObjects) is there an easy way to disable my object and prevent prisoners from using it, then re-enable it later, using lua? I tried fiddling with the On property but it seemed to have no effect, presumably because my object is not electrical.

I can probably do it in a rather round-about fashion by defining a brand new object that represents my base object in a 'disabled' state, then use scripting to swap between them automatically with Spawn and Delete, but that seems like overkill.
DarknessEyes
level2
level2
Posts: 105
Joined: Sat Apr 26, 2014 11:47 pm

Re: Can I make an object temporarily unusable?

Postby DarknessEyes » Tue Dec 29, 2015 11:04 pm

You can spawn a new object and attach it to the slot used.
There is no other way :( I'm having the same problem.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 4 guests