1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

Feedback Are there any proximity switches that will activate whenever a player is near?

Discussion in 'Starbound Discussion' started by Shadow Wolf TJC, Apr 29, 2016.

  1. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    I've been looking into designing dungeons that incorporated liberal amounts of enemies to fight, as well as proximity-activated traps and ambushes (such as, say, a situation where the player enters a room, only for the lights to be turned off, and the doors to open, revealing a number of npcs and monsters that were lying in ambush), but I'm afraid that npcs and monsters would trigger any of the proximity switches that are in the game. If there isn't already one in the game, could you guys add a proximity sensor (preferably an invisible one) that would only trigger when just the player (and not any monsters or npcs) walks near or in front of it? Outside of dungeon-generation purposes, I can imagine such a sensor as being useful for restricting the movement of unwanted npcs and monsters to and from player-made colonies.
     
  2. IvoryOwl

    IvoryOwl Pangalactic Porcupine

    Correct me if I'm wrong but ins't there a monster "nest" in the game? I remember reading something about it, where monsters spawn and go to hide after being seriously wounded... though that was many months ago so it may be obsolete now. Unless this featured was never implemented (or completely removed) I think something can be done with it to get similar results - tweak the block/object to spawn hostile npcs instead, in larger quantities, until the player triggers something to make it stop?

    An alternative idea would be to "attach" a spawn code to a particular object, could even be a non-vanilla one, and trigger it using wires maybe? Would it be possible? Try to use spawners that blend with the rest of the environment, so players don't attempt to remove it... although I guess that's not necessary because most dungeons are now protected with anti-tampering until you've finished them. As for "motion-sensor" the devs released a new video today that showcased traps and trapdoors! As soon as you step on them (or too close) they trigger and you may fall to your untimely demise. I think its something worth checking at least... maybe something can be done with it for other ends.
     
    Last edited: Apr 30, 2016
  3. cleavedCognition

    cleavedCognition Scruffy Nerf-Herder

    After fiddling around with the code for a bit, here's a solution I found.

    In the .object files for proximitysensor and scanner, (objects/wired/proximitysensor | objects/wired/scanner) replacing
    Code:
    "detectEntityTypes" : [ "creature" ],
    with
    Code:
    "detectEntityTypes" : [ "player" ],
    allows them to only activate when they detect a player. Optionally, you can add in "npc" to the types list to allow it to detect npcs as well. I haven't tested it, but I believe "monster" is also valid here if you want only monsters to activate it. You can possibly make a mini "mod" making several types of these wiring objects for different scenarios.
     
    Shadow Wolf TJC likes this.
  4. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Thanks for telling me. This should be useful for a future mod: the Wired Pack.
     
  5. cleavedCognition

    cleavedCognition Scruffy Nerf-Herder

    Check the mods section under crafting & building.
     
  6. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    You're talking about this, right? Personally, I would've included much more content, like, say, more compact logic gates and switches, a wall switch that players and npcs cannot directly interact with, and inputs on each and every switch in the game.
     
  7. cleavedCognition

    cleavedCognition Scruffy Nerf-Herder

    It was really only meant to be the sensors, not a full-fledged wiring mod. I figured the sensors were actually pretty useful after playing with them a bit, so I threw together a download for them.
     
  8. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    It's just a personal opinion. I've been wanting to see these other things added in for some time now.
     
  9. King Kitteh

    King Kitteh Starship Captain

    I went into one of those challenge rooms, and there were four giant monsters that I had to fight. Only when they I killed them did the exit open.

    So I'm guessing that there's already some sort of monster detection ingame for that to be possible.
     
  10. cleavedCognition

    cleavedCognition Scruffy Nerf-Herder

    I did some more poking around in the code, this time into the .json files for the challenge rooms to see how they managed that.
    Code:
    "properties" : {
      "parameters" : "{ \"detectArea\" : [ [-100, 0], [100, 100] ], \"detectDuration\" : 2, \"detectEntityTypes\" : [ \"npc\", \"monster\" ] }"
      },
    I don't know much about how these are working, but this is a nearly identical call to the one in the sensors I looked at before, but detached from any specific object. To me, it looks like the Devs have set an area used for detection to then activate other events. This might be a good way to perform this action in a modded dungeon, so that you don't need to use modded objects that can break if uninstalled.
     
  11. Zozozo

    Zozozo Void-Bound Voyager

    I'm sorry for bringing up an old thread, but I literally made an account here just to ask this question.

    Would you be able to further clarify how to edit what the proximity sensors detect? I've been searching like crazy, but I can't find these ".object" files. Anywhere.

    I'm running the game via Steam, if that makes a difference. I'm also really sad that downloading your "Specific Sensors" mod didn't work for me. When I downloaded it, I extracted the folder with it's contents into the Mods folder, but it had no effect. So instead, I decided to extract the contents of the mod into that same folder, and the game froze at the Chucklefish screen.

    Normally I'll download the mods from the Steam website, since that will implement them for me. I've proven to myself that I have no idea how to do it any other way.

    This is a seriously annoying problem. Would you be able to help this stupid noob?
     
  12. ManaUser

    ManaUser Scruffy Nerf-Herder

Share This Page