sneeking in the shadow

Topics regarding Scripting with Reality Factory
Post Reply
king_vegeta
Posts: 24
Joined: Sun Dec 04, 2005 11:34 pm

sneeking in the shadow

Post 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
Guest

Post 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.
Lupus
Posts: 10
Joined: Tue Sep 27, 2005 9:17 am

Post 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.
Life is the software of reality...
If you think it isn't fair, ask God to hack the code!
User avatar
Master
Posts: 81
Joined: Tue Jul 12, 2005 6:58 pm

Post 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]
king_vegeta
Posts: 24
Joined: Sun Dec 04, 2005 11:34 pm

Post by king_vegeta »

yeah i see....but id like to do a game like thief...so its pretty complecated with RF.... :wink:
User avatar
ZenBudha
Posts: 285
Joined: Wed Aug 17, 2005 6:06 am
Contact:

Post 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.
Fear not the textures for the almighty stylus is with thee - Book of Zen
Post Reply