Evert Posted February 12, 2009 Report Posted February 12, 2009 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" Quote
Seldoon182 Posted February 13, 2009 Report Posted February 13, 2009 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. Quote
Evert Posted February 13, 2009 Author Report Posted February 13, 2009 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! Quote
robert.briscoe Posted February 13, 2009 Report Posted February 13, 2009 you could have an invisible func_button around the rock to trigger the use event Quote
Evert Posted February 13, 2009 Author Report Posted February 13, 2009 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. =) Quote
Campaignjunkie Posted February 13, 2009 Report Posted February 13, 2009 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? Quote
Evert Posted February 14, 2009 Author Report Posted February 14, 2009 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. Quote
tofu Posted February 14, 2009 Report Posted February 14, 2009 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. Quote
Evert Posted February 14, 2009 Author Report Posted February 14, 2009 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 =( Quote
tofu Posted February 14, 2009 Report Posted February 14, 2009 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? Quote
Evert Posted February 14, 2009 Author Report Posted February 14, 2009 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. Quote
Recommended Posts
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.