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!!
Security
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.
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.
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
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.
http://www.realityfactory.info/forum/vi ... php?t=2573
use that to check within radius of teh scriptpoint.
Herp derp.
Ok, so if I want to learn the language, where can I find tutorials?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.