|
|
#1 |
|
Join Date: Jun 2010
Reputation: 0
Posts: 6
|
Need suggestions or assistance
I have written up a design outline for a short mod using Source, but as I am new to the Source engine and its capabilities, I had a few quick questions before I start work on it. There are a few game mechanics involving what the player can see, and I want to be sure that they are reasonable to code before I delve into it. (All of these involve a sight interaction with a single non-player entity; there will never be more than one.)
1. Can it be checked if the player is able to see the target (i.e., somewhere on the player's screen, not merely in line-of-sight), and if so, is there a way to measure how directly the player is looking at the target? (i.e., the distance of the target from the reticle) 2. Can it be checked if the player is facing the target? By that, I mean it returns a positive if the player can see the target onscreen (as in 1. above), but it also returns a positive if the player WOULD be able to see the target if there were no obstacles. For example, the player and the target on opposite sides of a wall, and the player is facing the wall towards the target. Both of these are crucial to the mod I have planned, and if either one isn't possible then I will not be proceeding with the mod. If they are possible but difficult to achieve, then I may need some help. (I may need some help anyway, since as I said I am new to Source modding.) |
|
|
|
|
|
#2 |
![]() Join Date: Aug 2011
Reputation: 152
Posts: 218
|
Both of those are possible with a bit of codding, well.. actually now that I'm thinking. Something similar is already coded into the source engine, trigger_look I *think*, might check that code wherever it is
a few edits and your good to go
|
|
|
|
|
|
#3 |
![]() Join Date: Nov 2008
Reputation: 110
Posts: 2,146
|
you could try to code a form of radar like that in CSS this might help you https://developer.valvesoftware.com/...erview_Display
|
|
|
|
|
|
#4 |
![]() Join Date: May 2010
Reputation: 0
Posts: 18
|
I'm pretty sure a trigger_look can do this.
|
|
|
|
|
|
#5 |
![]() Join Date: Apr 2008
Reputation: 247
Posts: 1,824
|
You makin' Amnesia: Source, bro?
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|