TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 9 of 9

Thread: How to light torches by radius?

  1. #1
    Member
    Registered: Feb 2000
    Location: Paris, France

    How to light torches by radius?

    I'd like to know how torches can be lit by radius. There are several effects I'd like to achieve, if there exists examples or tutorials I'd be very grateful to anyone able to help.

    The first effect I'd like to create:
    Torches in a room light up themselves according to how close they are from the player (ex: torches light up if they are in a radius of <10 dromed units of the player.

    A variant of this effect would be:
    Torches in a room light up and extinguish themself according to how close or how far they are from the player (ex: torches light up they are in a radius of <10 dromed units of the player, and extinguish if they are in a radius of >10 dromed units.

    The second effect I'd like to create:
    If the player lights one torch with a flare, other torches light up in a chain, from closes to farthest, until all the unlit torches in the level are active.

    This must have been done before, but I'm having trouble finding in which missions. Advice and guidance from S&R experts would be greatly appreciated!

  2. #2
    Member
    Registered: Mar 2001
    Location: Ireland
    You can use the NVSpikePitRoom script from The Temple of the Tides.
    Place it on a room containing the torches, ControlDevice-link it to each torch, and set the distance at which they should turn on via the design note NVProximity=6.00

    It goes on a room type because it's only active while the player is in that room, to reduce performance impact of checking the distances constantly.

  3. #3
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    For the first effect:

    1. Add a custom stim (e.g. GarrettProximityStim).
    2. Edit Garrett archetype. Add Act/React: Source - Stimulus: GarrettProximityStim, Propagator: Radius, Intensity: 100; Edit Shape - Radius: 30, No Flags, Linear Disperson; Edit Life Cycle - Flags: No Max Firings, Period: 100, 0 for the other fields.
    3. Now edit your torch and add Act/React: Receptrons - Stimulus: GarrettProximityStim, Min Intensity: 70, No Max Intensity; Effect: Stimulate Object, Target: Me, Agent: Source; Edit Effect - Stimulus: FireStim, Multiply by 1, Add 100
    4. Add another Receptron to the torch - Stimulus: GarrettProximityStim, No Min Intensity, Max Intensity: 70; Effect: Stimulate Object, Target: Me, Agent: Source; Edit Effect - Stimulus: WaterStim, Multiply by 1, Add 100
    5. Set torch AnimLight property to Minimum Brightness so it starts off.

    Adjust the value of 70 on both receptrons to try different distances. With 70 you'll need to be quite close to the torch to light it.

  4. #4
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Dragonsreach
    I did this in the haunted crypt in The Drymian Codex using a S&R setup similar to what nicked described, except I might have just sent TurnOn/TurnOff messages instead of FireStim and WaterStim. Also the trigger/source was an invisible AI rather than the player. The AI was invisible so the changing torches was a visual clue to the player as to where the AI was. But the concept is the same.

  5. #5
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    For the second problem, I don't know if there's a realistic way to make it dynamic. I don't think you could have the player be able to light *any* torch, and it dynamically work out which ones to light next, not without about a bazillion links anyway.

    If the first torch is always the same one, this setup becomes much easier. Torches respond to TurnOn, so you can just CD them. If you want a nice slowly-spreading effect, just add a relay in-between e.g.:

    Torch1 -CD-> NVRelayTrap1 (with Editor>Design Note: NVRelayTrapDelay=1000) -CD-> Torch2 -CD-> NVRelayTrap2 etc. etc...

  6. #6
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    Oh actually you probably could do it dynamically with another custom stim on the torches, with a big enough radius to affect nearby torches.

  7. #7
    Member
    Registered: Apr 2011
    Just be careful about torches that turn on and off too often: they start climbing up the walls!

  8. #8
    Member
    Registered: May 2002
    Location: Texas
    I thought that the torch climbing issue was fixed.

  9. #9
    Member
    Registered: Oct 2017
    Location: France
    Perhaps, but this is sperry we're talking about, and he still uses olddark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •