Go Back   Steam Users' Forums > Steam Tool Discussions > Source SDK General Discussion

Reply
 
Thread Tools Display Modes
Old 04-29-2012, 12:47 AM   #1
AgentParsec
 
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.)
AgentParsec is offline  
Reply With Quote
Old 04-29-2012, 01:53 AM   #2
sketchblo
 
 
 
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
sketchblo is offline   Reply With Quote
Old 04-29-2012, 01:57 AM   #3
taz-ed
 
Join Date: Nov 2008
Reputation: 117
Posts: 2,297
you could try to code a form of radar like that in CSS this might help you https://developer.valvesoftware.com/...erview_Display
taz-ed is offline   Reply With Quote
Old 04-29-2012, 02:01 AM   #4
sixλxis
 
 
 
Join Date: May 2010
Reputation: 0
Posts: 18
I'm pretty sure a trigger_look can do this.
sixλxis is offline   Reply With Quote
Old 04-30-2012, 12:02 PM   #5
stevethepocket
 
Join Date: Apr 2008
Reputation: 267
Posts: 1,972
You makin' Amnesia: Source, bro?
stevethepocket is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source SDK General Discussion


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 12:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.