Page 1 of 1

sneeking in the shadow

Posted: Wed Dec 07, 2005 1:38 am
by king_vegeta
is it possible to do so when the player is in the shadow the other actor don't see him??? And when he go back in the light everyone see him

Posted: Wed Dec 07, 2005 9:02 am
by Guest
If RF had a script commmand that Ray Traced to the closest (or all) of the level lights, you would be able to do this.

Posted: Wed Dec 07, 2005 9:57 am
by Lupus
If the shadows are static... You might be able to add empty brushes to the shadow areas, and then link them to a trigger. Then, the state of that trigger could be checked in pawn scripts. If the trigger is active, then the player is in the shadows.

Posted: Sun Dec 18, 2005 2:38 am
by Master
You might be able to add empty brushes to the shadow areas, and then link them to a trigger. Then, the state of that trigger could be checked in pawn scripts. If the trigger is active, then the player is in the shadows.
A long time ago i tried seperating the shadows from the light with one of those invisible pieces of geometry with no collision detection. The enemy reacted to it as if were a normal wall and lost me when i stepped through it (into the shadows). Same idea but with no triggers. The problem...even when the enemy watches you walk into the shadows he loses you. The result, not very smart AI. But with RF theres always a way around any problem.[/quote]

Posted: Sun Dec 18, 2005 2:47 am
by king_vegeta
yeah i see....but id like to do a game like thief...so its pretty complecated with RF.... :wink:

Posted: Sun Dec 18, 2005 9:19 am
by ZenBudha
Well why not use those invisible brushes to apply an attribute to the player such as set "Shadow=1"

Then if the attribute "shadow" > 0 have a trigger turn the enemy AI's distance check order off. So they basically become blind.

Then when the player walks out of the shadow have it damage that attriute to reduce it to 0.

Also give them an attribute like "Detected" and set it to zero. If the player is spotted by a pawn or attacks a pawn have it wait (so it doesn't do it if it dies) for a moment and then set a trigger that will add 1 to the players "Detected" attribute.

Then have the invisible brushes check for the "detected" attribute. If "Detected" > 0
Then have it not apply the +1 to the attribute "shadow"

That way if the player is undetected and in the shadow pawns cannot see him. If he strikes from the shadow or runs into the shadows while being pursued the pawns will still be able to see him.