Jump to content

Source: OnUse inside trigger areas


Recommended Posts

Posted

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"

Posted

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. :(

Posted

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

That seems rather... :(:shock:

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!

Posted

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.

Posted

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.

Posted

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 =(

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...