Portable lantern, Spitter-style.
Starting babble
First, there are some requirements for this tutorial:
Mediocre or better understanding of linking
At least basic understanding of Sources & Receptrons (Act/React)
Ability to understand my babbling
Sure, you *can* read this tutorial without the knowledge of the items above - the chances are that you just won't understand much. You may also be able to copy my lantern with ease, but that's not the point of this tutorial, but rather to show that it can be done (with relative ease) and this is just one way to do it. I'm pretty sure this whole thing can be done much more optimally and easily, but here's the way I made it.
Oh, and I won't describe everything step-by-step. If you don't know how to set up a conversation or a custom gamesys, read a corresponding tutorial. Sorry, my space (and will to write) is limited

Well, time to begin.
Work, work, everyone loves work
I'll start this tutorial by listing what we will want from this lantern (well, what I want anyway):
The usual portable lantern with light.
Player must be able to turn it on and off without the hassle of having to use other objects.
The light must not stay or linger behind. In other words, it must not bug.
Player must be able to use other objects while the lantern is on - so, even though the lantern is not currently active item from inventory, the light still works.
Sounds good? I truly hope so, because that's what we're going to get.
First, create a blueroom and set up two conversation markers in there, with rats as actors. Name the markers LitConv (this will turn our lantern on) and UnlitConv (vice versa - this turns our lantern off).
Now, when writing this tutorial, I'm copying pretty much everything from the test level I made - this means names and objects. Since I didn't originally plan to do a portable and toggleable lantern, I used a shovel as my initial lantern object. Yes, that's right, a shovel. Since the effect is based upon the fact that I'm teleporting the unlit lantern away from inventory and putting the lit one in there instead, it's also useful for debugging - you can quickly see which one you have in your inventory.
Anyway, on with it. Let's create the unlit lantern. As I stated already, I used a shovel. For sake of simplicity, put it right into Garrett's inventory (with Contains). Name it IllumiShovel, and give it following props:
Engine Features: FrobInfo: World Action [none], Inv [Script, FocusScript], Tool [none]
Scripts: TrigInvFrob (it allows you to send CD-messages from inventory.)
Renderer: Render type: Not rendered (So that player can't see a glimpse of this shovel when it's teleported away)
Inventory:
Can't drop this: TRUE
Object Name: Lantern:"Lantern" (or whatever you want)
Type: Item
Link IllumiShovel to LitConv. Now we need to do the lit lantern - I created a HackLight and named it LanternHack. Give it following props:
Engine Features: Frob Info: [none], [Script, FocusScript], [none]
Scripts: TrigInvFrob
Shape: Model Name: roblant (this is the lantern model)
Inventory:
Can't drop this: TRUE
Object name [use the same as in IllumiShovel]
Type: Item
ControlDevice-link this to UnlitConv.
Great. We have now two lanterns, but we can't yet switch between them. And, we are still missing the light! Let us do it first.
Create another HackLight somewhere, and name it LanternLight. Add the following props:
Rendered: Dynamic Light: 65 (or whatever you want)
Light Color: 0.14, 0.70 (your choice, again)
Good. And now, a bit of Act/React.
The Attack of the Flowerpots
I used a bit of S&R to get the light to teleport to the right place. Use whatever stim you want, I created a new stim for myself, JaniStim. Remember that you need to restart Dromed before you can use your new stim. Don't forget to save you mission/gamesys, or everything made this far have been in vain!
In LanternLight, add a new source. Set the stim to your custom stim, set propagator to radius and intensity to 5. In "Edit shape", set radius to 10, flags to none. In life cycle set flags to no max firings, and period to 20. This prodecure will make our light to fire a stim 50 times/second. We will continue this by giving Garrett a receptron which teleports the light next to Garrett when the light is in Garrett's vicinity. The radius is 10 since if Garrett is moving and we teleport the light next to Garrett (which we will do later on), Garrett may be too far away and the light may stay in the spot it was teleported to, and that's not quite what we want. Radius of 10 is sufficient to always "stick" the light into Garrett - at least if he's not under the effect of speed potion. I have not tested this, but it's quite likely that if you are giving speed potions to player, you need to increase that radius.
Since we now have a radius stim in LanternLight which affects player, I suggest you position it to blueroom, so that player doesn't accidentally walk into its radius and launch it prematurely.
So, we now need to add that receptron to Garrett. Do a "find_obj garrett" to get yourself to the Garrett archetype, and give him a new receptron. Put stimulus to JaniStim (or whatever you named your custom stim), min intensity to 4 and max intensity to 6. Set effect to "Teleport object", target object to Source (LanternLight gets teleported) and Agent to Me (teleport it at Garrett). Now, there's a nasty little bug (or a feature, if you prefer) in this - teleporting the light right into center of Garrett doesn't affect light gem at all - so we need to teleport it just a little bit away from him. In "Edit Effect" put positions into about following values: X=0.1, Y=0.1, Z=-0.1. That little trick now always teleports the Light into position (Garrett's X) + 0.1, (Garrett's Y) + 0.1, (Garrett's Z) - 0.1. That should do it.
Now, don't close the receptron main dialog yet. Since we are going to teleport the light away when the lantern is turned off (for obvious reasons), we need to also ensure that the light can get back to Garrett - I did with a TeleportTrap which I teleport right at Garrett, quite similarly to how I did the LanternLight above. We haven't created the TeleportTrap yet, but while we are here, we might as well add the receptron already. For this I also used my JaniStim, but set the min and max intensities to 19 and 21. Again, effect is "Teleport object", target is Source and agent Me. This time we do not need to edit the teleporting position - Garrett's central guts are fine.
Beam me up, Scotty!
It is time for the teleporting stuff. Let's take a look into what we really want:
Teleport our "Turned-off Lantern", in this case IllumiShovel, away when the Contains-link is broken (items which were previously in player's inventory appear into where Garrett was when the link was broken), to make sure that nothing funny happens, when the "Turned-on Lantern" gets moved into player's inventory.
Teleport our "Turned-on Lantern", LanternHack, away when the Contains-link is broken and the "Turned-Off Lantern" gets returned to player's inventory.
Teleport the light for lantern (LanternLight) next to Garrett when the lantern is turned on, so that the S&R trick we did earlier can kick in and stuck the light to Garrett.
Teleport the light for lantern away from Garrett when the lantern is turned off, so that it's too far for that S&R trick to work.
Start this by creating two buttons into the blueroom. We will use these to activate our TeleportTraps, and we'll activate these buttons themselves via a conversation. I named them TeleportShovel and TeleportLantern. Next, create four TeleportTraps, two for each button. They do not need names, really, but naming them doesn't hurt, so that it's easier to keep track of them. I didn't name the first two, but the other two I did: LightIn and LightOut. These are used to teleport the LanternLight.
Anyway, now for some linkages. Link TeleportShovel (with ControlDevices) to one of the unnamed TeleportTraps and LightIn. Link this unnamed TeleportTrap to IllumiShovel and LightIn to LanternLight. Next step, link TeleportLantern into the two remaining TeleTraps. Link other one of them to LanternHack and LightOut to LanternLight. That part is ready.
Now, back to some S&R. Give LightIn your custom stim as a source, set propagator to radius, intensity to 20, radius to 500, remove raycast-flag, no max firings and period to 500.
Guess what - it's time to do something with those conversation markers, and then we're ready.
First, open up LitConv and add following:
Action 0:
Add Link
Contains
LanternHack
player
(this bit puts the other lantern into player's inventory)
Action 1:
Remove Link
Contains
IllumiShovel
player
(this one removes the first lantern from player's inventory)
Action 2:
Frob object
TeleportShovel
(this bit activates the TeleTrap which moves IllumiShovel away from playing area and LanternLight near Garrett)
That's it! Now, do the following for UnlitConv:
Action 0:
Add Link
Contains
IllumiShovel
player
(this puts the first lantern back into player's inventory)
Action 1:
Remove Link
Contains
LanternHack
player
(this one removes the second lantern from player's inventory)
Action 2:
Frob object
TeleportLantern
(this bit activates the TeleTrap which moves LanternHack away from playing area and LanternLight away from Garrett)
Phew. I'm done. Go ahead, try it out, and send some death threats to
jsaarijarvi@hotmail.com if it doesn't work. I truly hope you understood at least a word from what I just wrote up there. Spitter signing out.