Renault on 14/4/2015 at 16:25
Here's my scenario - I want to be able to place an object in a room with a Security Camera that will deactivate it. Preferably when it gets within a certain proximity. And then of course, when I remove the object, the camera is reactivated. I'm hoping to make this a junk item, one that doesn't go into your inventory, and that it will still deactivate the camera whether you've set it down or not.
I got it working in a sloppy kind of Rube Goldberg way, but I wondered if there was a more elegant way to do it. I tried to create a FreezeStim and put a receptron on the Camera with the "Freeze AI" paramter, but it didn't work. I'm guessing Cameras aren't always considered an AI? The same method worked on a human guard.
Another method I experimented with was using the "Awareness Filter" parameter, but I couldn't get that to work either.
Any ideas?
R Soul on 14/4/2015 at 17:54
Quote Posted by Brethren
I got it working in a sloppy kind of Rube Goldberg way, but I wondered if there was a more elegant way to do it.
I can think of a way, but I don't know if it's more elegant than your way because you haven't said what it is.
Renault on 14/4/2015 at 18:22
In a nearby blue room, I have two elevator buttons, one that turns off the camera, and one that turns it on. In front of the one that turns it on, I have a broadhead emitter that fires every two seconds.
When the FreezeStim object is brought into the room with the camera, it frobs both the Off button and another button that actives the emitter. So while the FreezeStim object is in the room, both On and Off buttons are being pushed, but the "On" one is pushed less often, so the camera mainly stays off. It may stutter on for a quarter or half a second every so often, but not long enough to activate the turrets connected to it.
When the FreezeStim object is removed, the Off button is no longer pressed, and the emitter keeps hitting the On button every 2 second, reactivating the camera to 100% activity.
Ugly, no?
LarryG on 14/4/2015 at 19:07
What's wrong with using TrigRoomDeposit? Just make your special room brush to cover where you want the object to be active.
Quote:
TrigRoomDeposit
gen.osm 2
When an object is removed from a container (message Contained), such as the player's inventory, while in a specific room, or if it enters the room (message ObjRoomTransit) while not contained by another object, it will send TurnOn to objects linked from it with ControlDevice. If it leaves the room, or becomes contained by another object, it will send TurnOff. The room objects it will trigger in are specified with Route links from the object to the rooms, or to a room object the room inherits from.
There's also TrigRoomObject and TrigrRoomDelivery if you don't like TrigRoomDeposit for some reason.
Renault on 14/4/2015 at 19:34
Knew about TrigRoomDeposit, but I didn't want to be forced to drop the object. But one of the other two should work, although I'm not sure what the difference between them is. Thanks for the help.
Edit: putting some more thought into this - using room brushes will work OK, but it won't give me a true proximity, which would be more of a spherical shape. Should be fine though.
Does having a room brush within another room brush screw up sound propagation though?
LarryG on 14/4/2015 at 20:50
Quote Posted by Brethren
Knew about TrigRoomDeposit, but I didn't want to be forced to drop the object. But one of the other two should work, although I'm not sure what the difference between them is. Thanks for the help.
Quote:
<dl><dt id="trigroomdelivery">TrigRoomDelivery
</dt><dd>gen.osm 2 A derivative of <code>(
http://thiefmissions.com/telliamed/scripts.html#trigroomobject) TrigRoomObject</code>. Sends <code>TurnOn</code> along <code>ControlDevice</code> links when the object enters a room while being contained by an <code>Avatar</code>. Sends <code>TurnOff</code> if the object leaves the room or is dropped. Entering the room while not in the inventory does nothing. Picking up an object in the room will send <code>TurnOn</code>. The rooms to trigger on are specified with <code>Route</code> links from the object to the room objects, or a parent of the room objects.
</dd></dl>
vs.
Quote:
<dl><dt id="trigroomobject">TrigRoomObject
</dt><dd>gen.osm 2 Sends <code>TurnOn</code> to <code>ControlDevice</code> linked objects when this object enters a specific room (message <code>ObjRoomTransit</code>). Sends <code>TurnOff</code> when leaving the room. The room to trigger on is specified with <code>Route</code> links from the object. Any room object that inherits from one of the linked rooms will trigger the script. Moving between two different rooms that both have a <code>Route</code> link from the object will do nothing. Even non-physical objects receive <code>ObjRoomTransit</code> messages, so objects in inventory will also trigger.
</dd></dl>
So for TrigRoomDelivery you have to carry the object. With TrigRoomObject you should be able to toss the object into the area or carry it.