Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trigger on hostiles device  (Read 2231 times)

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Trigger on hostiles device
« on: March 31, 2012, 11:21:33 pm »

Would it be possible to make an automatic invader sensor by pasturing an animal in an entrance guard type position, with an exit leading back into the wall behind the animal.  The animal is in a 1x1 pasture, and will not leave unless a hostile scares them, causing them to flee into their escape hall, tripping a pressure plate as they go (so it can't be a cat).  Alternately, you could use a war dog, which triggers a plate as it charges into the hall. 

You might, from time to time, get a dwarf randomly wandering across the plate, so you might not want to link it directly to the magma devices, but it could trigger the drawbridges to go up, sealing any goblins in the kill zone.  Would there be a way to seal the animals alcove to keep dwarves out, while still getting a reliable response from an animal?  Would it flee from a pasture just seeing a hostile through a window, or does it need a path?

Code: [Select]
Outside
     g
##### #
##### #
  ^A  #
##### #
##### #
Inside

ready state

^ - pressure plate
A - non grazing animal (heavy enough to trigger plate, standing in a 1x1 pasture)
g - goblin

Outside
 ##### #
 ##### #
   A  g#
 ##### #
 ##### #
 Inside

animal sees goblin, flees to left, triggering plate, presumably doing something worthwhile
Logged

cerevox

  • Bay Watcher
    • View Profile
Re: Trigger on hostiles device
« Reply #1 on: March 31, 2012, 11:24:03 pm »

You would also need some way to keep a marksgoblin from just killing it before it can move, or thieves from randomly setting off the trap.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Trigger on hostiles device
« Reply #2 on: March 31, 2012, 11:26:09 pm »

Coincidentally, you could just put the pressure plate in the hallway to let the goblin trigger it, although your idea does lend itself to allow [TRAP_AVOID] detection.

Perhaps a more meaningful use would be to place these outside, to detect wild animals?

Really all you need is a 1x2 bit, that'd be a 3x4 walled area, preferably with one side walled and the "viewing" side fortification and/or window.  Have one tile be a meeting zone, and the other be a pressure plate.  The animal will move to the meeting zone naturally, but step out when startled.

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Trigger on hostiles device
« Reply #3 on: March 31, 2012, 11:30:44 pm »

I was hoping this would be a little more selective than just Trigger on Noncitizen, which would trigger for merchants and large animals, which would be a real nuisance if that sealed the entrance.

So they do flee when they see a hostile through a window?  Excellent, that should deal with the marksgoblin problem.
Logged

lcy03406

  • Bay Watcher
    • View Profile
Re: Trigger on hostiles device
« Reply #4 on: April 01, 2012, 02:23:56 am »

You could place the press plate just in the 1x1 pasture, so it is always 'on' until the dog leaves the pasture. anyone else cannot turn it 'off'. As the signal is reversed, you may want to use a retreat-bridge-over-slope as the entrance gate, instead of the drawbridge. this is also safer, eliminated the atom-smash-accident.
Logged

Nil Eyeglazed

  • Bay Watcher
    • View Profile
Re: Trigger on hostiles device
« Reply #5 on: April 01, 2012, 02:40:34 am »

1) Animals are unreliable.  They'll wander around a little bit.  That means that they'll give you false alarms.

2) If you don't trigger on citizens, you won't catch merchants or their yaks.  Don't worry about that.  Those guys are essentially trapavoid.  But you probably still want to solve this problem, because you want an alarm in case of kobold invasion.

3) It is possible to do this.  I put my head to it a while ago, although I never bothered implementing it.  My solution involved a lever puller on repeat (probably a vampire) behind a glass window.  There are ways to make it such that when the lever hasn't been pulled for 100 ticks, something gets triggered.  It's a little complicated (only a little), and I believe the fun is in coming up with the solution.  At least, it is for me.  So if you want to know the solution I came up with, I'll tell you, but I think you might want to just dwell on it for awhile, because that aha moment is basically the epitome of living.
Logged
He he he.  Yeah, it almost looks done...  alas...  those who are in your teens, hold on until your twenties...  those in your twenties, your thirties...  others, cling to life as you are able...<P>It should be pretty fun though.

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Trigger on hostiles device
« Reply #6 on: April 01, 2012, 07:11:01 am »

1)  They'll even wander when pastured?  I would have expected it with a meeting are, but I've never had livestock leave my pasture without being chased or let out by a dwarf.
Logged

Garath

  • Bay Watcher
  • Helping to deforest the world
    • View Profile
Re: Trigger on hostiles device
« Reply #7 on: April 01, 2012, 07:22:49 am »

occasionally they will wander away. Not often, but sometimes
Logged
Quote from: Urist Imiknorris
Jam a door with its corpse and let all the goblins in. Hey, nobody said it had to be a weapon against your enemies.
Quote from: Frogwarrior
And then everyone melted.

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: Trigger on hostiles device
« Reply #8 on: April 01, 2012, 07:39:33 am »

Huh, I'll have to try it out and see how reliable it is.

Animals won't leave their chains to flee, right?  I believe they only leave chains if they're actually attacked.
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Trigger on hostiles device
« Reply #9 on: April 01, 2012, 08:39:52 am »

Animals can't leave chains under their own power even if attacked.  They can only leave the chain if physically forced away from it.  Which can happen while fighting, if the animal is propelled through the air by the force of a blow.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.