1. Forums
  2. Discord
  3. About Mapcore
  4. Patreon Supporters
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • More Options
  1. Mapcore
  2. Discussions
  3. Level Design

Source: OnUse inside trigger areas

  • Evert
  • February 12, 2009 at 10:28 PM
  • Evert
    • February 12, 2009 at 10:28 PM
    • #1

    I have been trying to set up a case where I use a trigger_look, with an assigned target which works fine.

    What I want is to have the the player to enter that area, look in the correct direction and ALSO have to press Use in order to 'investigate.

    I can make it work with invisible buttons and logic and filter entities, but I want the "Use" to work everywhere inside a non-solid area.

    Is there a simple way that anyone more familair with Source SP scripting know of?

    What I have

    Player sees green rock

    Player walks up to green rock

    Look at rock = "You found a green rock"

    What I need

    Player sees green rock.

    Player walks up to green rock.

    Message on screen: Investigate Rock

    Look at rock+press Use = "You found a green rock"

  • Seldoon182
    • February 13, 2009 at 8:35 AM
    • #2

    What's game/mods is it? If this is for personal work, the best way to go would be to create a new Source mod from Half-life 2 Sp. I think you're going to call your programming skills if you want to achieve your goal.

  • Evert
    • February 13, 2009 at 8:41 AM
    • #3

    Yes it's a mod based on Source/Ep2.

    That seems rather...

    The entity system so far has proven very powerful. You can do all sorts of super-advanced stuff, there MUST be a way to hack this in with the current ones

    Otherwise, programming skills Assemble!

  • robert.briscoe
    • February 13, 2009 at 12:21 PM
    • #4

    you could have an invisible func_button around the rock to trigger the use event

  • Evert
    • February 13, 2009 at 1:01 PM
    • #5
    Quote from Evert

    I can make it work with invisible buttons and logic and filter entities, but I want the "Use" to work everywhere inside a non-solid area.

    =)

  • robert.briscoe
    • February 13, 2009 at 1:04 PM
    • #6

    screw you hippy!

  • Campaignjunkie
    • February 13, 2009 at 10:58 PM
    • #7

    Turn every group of "rock" entities into a template, and then spawn instances of that template; you could parent the trigger_look and the func_button to the rock, and when it spawns the game will automatically increment the entity names so that instances don't conflict... See here: http://developer.valvesoftware.com/wiki/Point_template

    ... or did I misunderstand the problem / question?

  • Evert
    • February 14, 2009 at 11:46 AM
    • #8

    Yeah, that would still require the player to walk up and press use on the actual rock. The best (or what I want) would be to have an area, say 10 meters in every direction, and as soon as the player enters this area he is able to press Use in order to get the information about it.

  • tofu
    • February 14, 2009 at 1:59 PM
    • #9

    I can't verify completely, as tf2 doesn't have a use option - but I applied the NPC Clip texture to the func_button and that removed its solidarity, so I could walk inside it - though I'm not sure if this removes the buttons function or whether you'll have NPC's nearby whom will still hit the collision.

  • Evert
    • February 14, 2009 at 4:04 PM
    • #10

    Hmm closer

    No NPC's to worry about, so this could have worked.

    I can walk in and out of the button, and Use works, BUT only from the outside standing next to it and not when inside it =(

  • tofu
    • February 14, 2009 at 4:16 PM
    • #11

    Create a batch of them, so that the 'inside' radius is made up of several small ones, so that the player is always next to one. Not ideal but should do the trick?

  • Evert
    • February 14, 2009 at 4:19 PM
    • #12

    Yeah that crossed my mind as well, that is probably possible, I will do that if all else fails.

    Interlopers mentioned the game_ui entity, might be able to hack something together with that.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login
Discord

The Mapcore Discord is our lively IRC channel of the 2000s reborn. Chat about level design, gaming, and more.

Latest Posts

  1. Custom Gamemodes Contest

    Angel
    July 20, 2026 at 11:46 AM
  2. FAQ

    Angel
    July 20, 2026 at 10:14 AM
  3. Tangerine

    Harry Poster
    July 18, 2026 at 11:10 AM
  4. Any of the old guard still around? D:

    Warby
    July 12, 2026 at 8:23 PM
  5. About our archived forums

    Thrik
    June 30, 2026 at 2:12 PM
  6. Mapcore Discord

    mason_fan123
    June 24, 2026 at 8:52 PM
  7. [CS2] Valley

    Serialmapper
    June 22, 2026 at 11:56 AM
  8. Free Music / SFX Resource - Over 2500 Tracks

    Eric Matyas
    June 18, 2026 at 12:32 PM
  9. Pango [WIP]

    Elowen
    June 11, 2026 at 10:13 AM
  10. [CS2] Dvina

    Jeremy Rivera
    June 11, 2026 at 10:03 AM

Users Viewing This Thread

  • 2 Guests
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™