Search found 232 matches
- Tue Sep 06, 2016 8:18 am
- Forum: Modding
- Topic: How to detect if object is in use?
- Replies: 5
- Views: 1689
Re: How to detect if object is in use?
Doesn't this info get saved on the object itself? Just have some prisoner using the computer and look in the savegame how it's dealing with it. I guess it's linking the Id.i and Id.u from the prisoner to the computer.
- Sat Sep 03, 2016 7:05 pm
- Forum: Modding
- Topic: Can I change prisoners security based on reform grade?
- Replies: 21
- Views: 13968
Re: Can I change prisoners security based on reform grade?
Wait, what? Can we now use this new World.NumPrisoners toy instead of using GetNearbyObjects(this,'prisoner',150) in order to find them? Possible to do something like this? local AllMyPrisoners=World.NumPrisoners for i,v in pairs(AllMyPrisoners) do things with them end Or did I get that completely w...
- Fri Sep 02, 2016 9:40 am
- Forum: Modding
- Topic: [MOD] Customizable Control Booths [V1.40 stable]
- Replies: 35
- Views: 14437
Re: [MOD] Customizable Control Booths [V1.31 stable]
Version 1.31 is out: a big update with vital changes to scanned areas and compatibility for PA 2.0
Read full change log in first topic.
Read full change log in first topic.
- Sun Aug 28, 2016 4:08 pm
- Forum: Modding
- Topic: >Mod Suggestion (More Frequent Trucks)
- Replies: 1
- Views: 1976
Re: >Mod Suggestion (More Frequent Trucks)
Use the RoadWorks mod: make more roads so you can have more trucks come in simultaneously.
https://steamcommunity.com/sharedfiles/ ... =574426965
You can also use road sensors with that, to control your gates https://steamcommunity.com/sharedfiles/ ... =730122979
https://steamcommunity.com/sharedfiles/ ... =574426965
You can also use road sensors with that, to control your gates https://steamcommunity.com/sharedfiles/ ... =730122979
- Sun Aug 28, 2016 10:15 am
- Forum: Modding
- Topic: [MOD]Real-time Basketball [V2.24 Stable]
- Replies: 6
- Views: 5850
Re: [MOD]Real-time Basketball [V2.24 Stable]
Updated to version 2.24 for full support of new features in PA 2.0. Note that this version has now become incompatible with PA update 1.8 and below, but you can always download a prior version of the mod at prison-exchange. - Full multi-language support: you can translate the base-language.txt if yo...
- Fri Aug 26, 2016 8:29 am
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
Well now you can also play around with the dev tools
- Wed Aug 24, 2016 2:00 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
Which is where I don't really think that it would matter much for our little modding excursion due to how fast modern processors are and they are all using very advanced branch predictors, op caches and other stuff. ^^this. Since the cpu has become so fast nowadays it really doesn't matter for such...
- Tue Aug 23, 2016 10:02 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
BTW this new scanning method works perfectly man. I set it to increase the range in odd numbers, so you can always draw the proper square: scan range 17 tiles? Draw a line 8 tiles to the left from the alarm, then 8 tiles to the right, and draw the square. There's your foolproof scanned square area!
- Tue Aug 23, 2016 9:46 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
Looks neat ^^ Is the "If" branch empty? Because if so then you could restructure/invert the Condition in a way that the if branch is taken only if the sprinkler is out of bound, and skip the else part. Something like so: function GetObjectsInSquare(theObject,theRange) if this.Or.x==-1 the...
- Tue Aug 23, 2016 2:49 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
[completely off-topic]Perhaps you have any idea how to get colours to work in the tooltips? Try some lua examples on the net, won't work. But maybe I've tried it for the wrong lua version, didn't think of that... Or it has to be enabled by the devs in the code before we can reach it via mods.[/compl...
- Mon Aug 22, 2016 10:24 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
Yes well I tend to put some more stuff after the for loop sometimes, so it would run through the for loop and then screw up on the code after it lol. BUT I've seen code fuck up in the for loop as well if nil wasn't catched with the next() in front of it. Very weird and unexplainable behaviour indeed...
- Mon Aug 22, 2016 3:21 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
Yeah well you never know what could be put inside in the future, so I'd rather leave it like that. Same with the 'If next(thisstuff) then' constructions before using a for loop, I noticed the script would bug out with errors if it's not present now and then. Sometimes things happen which you didn't ...
- Mon Aug 22, 2016 11:12 am
- Forum: General
- Topic: Suggestion: Corrupt officers
- Replies: 3
- Views: 489
Re: Suggestion: Corrupt officers
wistihd wrote:- Beating prisoners
Did you ever notice what happens when a Cop Killer misbehaves? The guards can't resist beating them to death if you don't stop them. Read some more about it here: https://steamcommunity.com/app/233450/d ... 100134609/
- Sun Aug 21, 2016 11:16 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
Hmm, made some more tweaks to it. Instead of being the centre of the scanned area, the alarm will now be at the border of the square. It's usually mounted on a wall anyway, so everything behind that wall will now be left alone. So if an alarm is facing left then it will scan the sprinklers to the le...
- Sun Aug 21, 2016 6:19 pm
- Forum: Modding
- Topic: Object.GetNearbyObjects() returns objects in a radius
- Replies: 23
- Views: 5328
Re: Object.GetNearbyObjects() returns objects in a radius
After a nice dinner this came out of my hands: function GetObjectsInSquare(theObject,theRange) local Xmin=this.Pos.x-theRange/2 local Xmax=this.Pos.x+theRange/2 local Ymin=this.Pos.y-theRange/2 local Ymax=this.Pos.y+theRange/2 local CompiledList = {} local NumObjects=0 local ListOfObjects = this.Get...