Home   Help Search Login Register  

Author Topic: AI Auto Crouch And AI Search and destroy scripts  (Read 7790 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
AI Auto Crouch And AI Search and destroy scripts
« on: 20 Jul 2005, 21:22:24 »
hey,
i made 2 scripts which improve the AI

the first one AI crouch is one that is new to ofpec.
what it does is makes the men in your group go to crouch when ever they stop moving, it can be integrated with the face direction option which is explained in the demo.

the second one AI search and destroy has already been made before but the reason i made this one is because it is so much more simple to use. it is more limitted but all you need to do to activate it is put in a persons Init field [unitname]exec"look.sqs" there are some other ones but they all need multiple scripts and syntaxes and trigger stuff that is much more complicated. thats why i made this one. it spruces up AI a bit and makes them come looking for you if they recieve any hint that your there(a gunshot, a glimps of you) the main effect of this script is that it will improve urban AI a lot. you can pop out around a corner and shoot at an AI and then go back around and instead of just sitting there he will come around the corner and activly seak and destroy you.

enjoy the scripts.

klavan

  • Guest
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #1 on: 25 Jul 2005, 11:59:57 »
I gave 'em a try.

The S&D script is OK. Useful even for patrols.
The crouch script is good too, but I think It could be slighty improved, because the AI doesn't go down anymore when you hit the dirt.
You may add this feature so that if you go down yur mates follows you in the mud.
Klavan  
« Last Edit: 25 Jul 2005, 12:00:37 by klavan »

Offline Blanco

  • Former Staff
  • ****
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #2 on: 26 Jul 2005, 06:01:42 »
Yeah, I have the same suggestion, problem is...you can't detect the unit stance in OFP.

How about this for AI

- Place a trigger in a certain dense or dangerous areas (forest, towns) where the troops have to change their behaviour into auto crouch. When they are present the script kicks in, when they are out the script put them back in a normal behaviour and wait in case the troops walk in again, maybe you could use a repeatable trigger...



Search or search or search before you ask.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #3 on: 26 Jul 2005, 19:08:26 »
ya, the crouch one i intended for more urban situations

thanks for testing, il try the triger thing

klavan

  • Guest
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #4 on: 26 Jul 2005, 19:23:13 »
Why not an user action? Maybe it's uncandy for player's eyes to see a "Force Crouch" action in his menu, but at least he/she can decide when and where.
In my opinion  it's a bad choice to force frendly AI doing something you cannot TOTALLY control.  
Klavan

Crassus

  • Guest
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #5 on: 01 Aug 2005, 00:38:35 »
I'm still now playing around with your Crouch demo; I believe you're on your way to giving us some semi-realistic actions on the part of AI while on patrol. :o

At this stage of your scripting, it's probably a bit early for them, but....

Suggestions:
1. Aren't we able to "detect" when the player's in the kneeling position using Vektorbossen's camera scripting tricks? If this is possible, then there's the possibility that the AI squad members will not kneel > prone until the player/leader does. (You could of course add a time check: if the player's in one place for say 30 seconds or longer, but has not yet kneeled,  only then would the AI kneel.....Then prone....face outboard and the tailend charlie covers the rear.)

2. Eye Candy Warning: Would you be able to script in a variable time at which the each AI squad member would kneel. All of them kneeling at the same time doesn't look that great. Also, if you can get them to kneel only when they've stopped, instead of kneel-move-kneel when they move to their proper positions in the formation.....

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #6 on: 15 Aug 2005, 21:39:22 »
ya that is a problem im not sure how to fix,  i could add a variable that lets the mission make decide how long after stopping he wants them to kneel.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #7 on: 16 Aug 2005, 02:38:51 »
Is there a way of detecting how far an object is from the ground? If ythere is you could check to see how far the weapon is from the ground.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #8 on: 16 Aug 2005, 21:23:35 »
I dont know,  maby

Crassus

  • Guest
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #9 on: 18 Aug 2005, 23:06:44 »
Is there a way of detecting how far an object is from the ground? If ythere is you could check to see how far the weapon is from the ground.

I believe there was some related discussion, when there were attempts to mount a machinegun to a tank as a commander's gun. Nothing ever panned out.  :-[

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #10 on: 01 Sep 2005, 12:20:14 »
Hint:- set out your scripts better, more spacing and a few more expanded comments.

youll find these scripts a few years from now and not have a clue how they work!!!

Im only saying this cause it's happened 2 me lol

cornhelium

  • Guest
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #11 on: 06 Sep 2005, 20:27:21 »
Hi,

Quote
problem is...you can't detect the unit stance in OFP.

I think General Barron came up with a way of detecting if a unit is prone. Try dropping him an IM  ;)

Cheers,
CH

Crassus

  • Guest
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #12 on: 06 Sep 2005, 22:16:06 »
Hi,I think General Barron came up with a way of detecting if a unit is prone. Try dropping him an IM  ;)

Cheers,
CH

Oooh, if you do locate such scripting, would you mind terribly reporting back; I'd like to get my paws on that code! ;D

Offline 456820

  • Contributing Member
  • **
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #13 on: 11 Sep 2005, 13:10:15 »
ive noticed on the auto crouch that they allways seem to be in Combat mode and if you order them to hit the dirt they do then they get back up when they move is there a way to fix that since thsis would be great for my mission all my men get blown to peices so with this they shouldnt as much but they get shot up twice as much since i keep ordering them to get down so they get up and get shot is there a way to fix this

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:AI Auto Crouch And AI Search and destroy scripts
« Reply #14 on: 12 Sep 2005, 00:30:05 »
I am reasonably sure (~80%) that no one has come up with a way of finding if a unit is prone, or what stance he is in at all. I can remember a lot of discussion about it, and different methods being tried, from model section-specific drop particles, to focussing a camera on a unit and checking its height, to getting the height of fired ammo using event handlers. None proved to be reliable. If someone has found a way, it will have been recently.

GB is away for a month or two, although I'm not sure, he may still be checking his messages/emails.