sneeking in the shadow
-
- Posts: 24
- Joined: Sun Dec 04, 2005 11:34 pm
sneeking in the shadow
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
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.
Life is the software of reality...
If you think it isn't fair, ask God to hack the code!
If you think it isn't fair, ask God to hack the code!
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]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.
-
- Posts: 24
- Joined: Sun Dec 04, 2005 11:34 pm
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.
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.
Fear not the textures for the almighty stylus is with thee - Book of Zen