Page 1 of 1
Security
Posted: Tue Nov 27, 2007 5:14 pm
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!!
Posted: Tue Nov 27, 2007 6:12 pm
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.
Posted: Tue Nov 27, 2007 7:04 pm
by vrageprogrammer
Splinter Cell?
Posted: Wed Nov 28, 2007 12:32 am
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.
Posted: Wed Nov 28, 2007 12:53 pm
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?