Security

Topics regarding Scripting with Reality Factory
Post Reply
Matte
Posts: 321
Joined: Fri Oct 19, 2007 7:49 pm

Security

Post by Matte »

I want to make a sneaking game, but could anyone give me a good script for AI that if they see you, they will try to put the alarm on, and also for Security Cameras (that may move, but this is not necessary).

THX!!
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

This is why you should learn the scripting language. I don't think there are many people who have such scripts, and even if they shared it you'd have to set up the script, pawns and level properly. I think it's way easier to script the AI yourself.

So, if you decide to write your own AI, I think the most complex part will be finding the nearest point where you can turn on the alarm. Moving there could be a challenge too. Right now I can come up with two ways to do this:

1.) Place a ScriptPoint near every "alarm button" (alarm switch, or whatever the place is called where the pawn goes to turn on the alarm). Then if the pawn sees the player you can use 'NearestPoint()' to get the nearest alarm button. Though this would mean that there could be no other scriptpoints, so the enemys couldn't move along predefined paths.

2.) Place a pawn near each alarm button and then make the enemy pawn somehow check which of these pawns is closest and then decide where to go. I'm not sure about the details but I'm positive that it is possible.
Pain is only psychological.
User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post by vrageprogrammer »

Splinter Cell?
It was not Possible to determine the dimensions of the image....
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

well u gots to be a pretty gud scripter but heres one way
http://www.realityfactory.info/forum/vi ... php?t=2573
use that to check within radius of teh scriptpoint.
Herp derp.
Matte
Posts: 321
Joined: Fri Oct 19, 2007 7:49 pm

Post by Matte »

Juutis wrote:This is why you should learn the scripting language. I don't think there are many people who have such scripts, and even if they shared it you'd have to set up the script, pawns and level properly. I think it's way easier to script the AI yourself.

So, if you decide to write your own AI, I think the most complex part will be finding the nearest point where you can turn on the alarm. Moving there could be a challenge too. Right now I can come up with two ways to do this:

1.) Place a ScriptPoint near every "alarm button" (alarm switch, or whatever the place is called where the pawn goes to turn on the alarm). Then if the pawn sees the player you can use 'NearestPoint()' to get the nearest alarm button. Though this would mean that there could be no other scriptpoints, so the enemys couldn't move along predefined paths.

2.) Place a pawn near each alarm button and then make the enemy pawn somehow check which of these pawns is closest and then decide where to go. I'm not sure about the details but I'm positive that it is possible.
Ok, so if I want to learn the language, where can I find tutorials?
Post Reply