I kinda idiotically derailed Fuzzie's "HEV Extentions" thread with this idea, but is it possible to have stealth via shadows/lighting in Gmod and lua? I really don't know how to describe it, but i'm looking for something (besides obvious invisibility/cloaking) that can actually provide the ability to sneak around NPCs or such, and be able to retreat without the bastards chasing you across the whole map.
Someone suggested something along the lines of the good old 'notarget' cheat, but I figured that perhaps the player's current lighting could be calculated to have self-activated notarget so that NPCs wouldn't see you in the dark or something, but that would be wonky as hell I figure.
Anyone care to help or submit their own possible improvements to the idea?
I have something because it would be a problem if they were chasing you and you run into the shadows they would just ignore you I think...
He wasn't talking about the cheat. Player.NoTarget is an internal method. Detection by lighting is impossible in the Source Engine, unless you hard coded it otherwise, such as noded areas of light to be detected by the game.
For this to be done, you would need either custom maps, or a script to layout such nodes, on a map-by-map basis.
The alternative is by running line of sight traces on each NPC (expensive) and running Player.NoTarget on each player unless they were in light of sight of an NPC, or in proximity and moving over a certain speed (footstep sounds).
[QUOTE=RikohZX;18360061]Anyone care to help or submit their own possible improvements to the idea?[/QUOTE]
Yes I do, If your in a partially lit area then a npc can only see you if they saw you move into the shadows. Then after you move into a darker area the npc loses sight of you.
[QUOTE=barling;18360094]I have something because it would be a problem if they were chasing you and you run into the shadows they would just ignore you I think...[/QUOTE]
No, as you could always theoretically set an override for this.
[editline]05:23PM[/editline]
[QUOTE=Mod;18360148]Yes I do, If your in a partially lit area then a npc can only see you if they saw you move into the shadows. Then after you move into a darker area the npc loses sight of you.[/QUOTE]
You're late. I stated this wasn't possible, and we're already past that concept anyway. It's horribly obvious.
[QUOTE=andrewmcwatters;18360152]No, as you could always theoretically set an override for this.[/QUOTE]
Ok it was just a though I don't know that much about those things.
just a thought:p.
[QUOTE=barling;18360175]Ok it was just a though I don't know that much about those things.
just a thought:p.[/QUOTE]
Good for mentioning though, well done: this is a part of the conceptual process for constructing such an addon.
[QUOTE=andrewmcwatters;18360191]Good for mentioning though, well done: this is a part of the conceptual process for constructing such an addon.[/QUOTE]
Piece by piece we'll get there:D.
Doesn't the achievement mod have something for staying in the dark?
How do they calculate that?
Dark Messiah of might and magic had a stealth system so it is possible ;3
The lighting is at a certain point on a map is only fetchable through a clientside method ( render.GetLightingColor or something like that ), which returns a vector describing the light at the point.
There is no serverside way to detect this. You would have to find all light entities, calculate if a player is close to them, etc, for it to work and then it wouldn't be as good because they could be in the bright daylight and be in the darkness as far as the code cares.
[QUOTE=Kogitsune;18363054]The lighting is at a certain point on a map is only fetchable through a clientside method ( render.GetLightingColor or something like that ), which returns a vector describing the light at the point.
There is no serverside way to detect this. You would have to find all light entities, calculate if a player is close to them, etc, for it to work and then it wouldn't be as good because they could be in the bright daylight and be in the darkness as far as the code cares.[/QUOTE]
Seeing as not many multiplayer servers would even bother with adding a stealth element against NPCs (especially the roleplay ones that use zombies or bring out combine battalions for war events, etc.), I don't think this would be too troublesome.
I think we should figure it out for Singleplayer first, before even trying to apply this to multiplayer.
Sorry, you need to Log In to post a reply to this thread.