Home   Help Search Login Register  

Author Topic: AI behind tanks/apc  (Read 1602 times)

0 Members and 1 Guest are viewing this topic.

Clees

  • Guest
AI behind tanks/apc
« on: 07 Jan 2005, 03:44:59 »
Some time ago I had a idea how to make AI soldiers to hide (take cover behind friendly tanks) - you know this scens - soldiers shooting to enemy and after a second taking cover. I know.... everyone wants to see this kind of stuff in action (so am I  ;) )

This is my Idea:
All tanks and APC are more/less same size (I mean here how much ground they "use"). With help of very simple trigonometry (part of math- you know.. sin , cos , tg, ctg), getDir (I think this function was called so), and getPos  we can find corner of a tank and other places which are in the moment give cover from enemy fire (we need to know where enemy shoot to us from - the event "fired" or "moust known enemy script" or its variants can be useful) and its ready.

So how I think this script should work?
1. If something goes wrong (or not wrong) (unit is being fired, pre-scripted trigger etc.) script is activated.
2. Script ("take cover behind tank !!") selects random or (not random) soldiers from our group to go behind tank , and to prone, and to stay there for while..
   a) we get dir of tank
   b) we get position of tank
   c) we use data form a) and b) to calculate position where corner and cover
       should be (more less of course)
   4) doMove ....
   5) wait till done
   6) make AI use this cover - by making it stay in position (I saw it in custom formation script) combination of playmove and switch move (for custom moves)...

What do you think

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:AI behind tanks/apc
« Reply #1 on: 07 Jan 2005, 03:55:29 »
Nice idea.

However, I see a slight problem.

I think you would end up with lots of dead soldiers, crushed to death by their own tanks.

In my experience tanks will not stay still to be used for cover, they will move and injure or kill men who are using them for cover.

I suppose you could get them to stop whilst they are being used this way, although I'm not sure if they won't start moving as soon as they come under fire.


Planck
I know a little about a lot, and a lot about a little.

Clees

  • Guest
Re:AI behind tanks/apc
« Reply #2 on: 07 Jan 2005, 04:06:03 »
Thats the point... where is solution? Only per-scripted groups ... i think.. this group use this tank .. and both groups work together.. or a tank in inf. group... or good information sharing (to general answer ...)

Romek

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:AI behind tanks/apc
« Reply #3 on: 08 Jan 2005, 02:11:14 »
i dont know but i always thought soldiers were taught to stay away from high priority targets for the enemy(apcs/tanks) because they recieve explosive ordinence (rpgs/sabots) so now the men are not only taking bullets, they are now taking rpgs and missles.

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:AI behind tanks/apc
« Reply #4 on: 11 Jan 2005, 00:02:59 »
I know that I stay away from them.
--Ben

Clees

  • Guest
Re:AI behind tanks/apc
« Reply #5 on: 12 Jan 2005, 00:42:52 »
And what with urban combat - I dont know military tactics ... but i think it would be nice to see soldiers hiding behind frinedly tanks/apc in city.

Dubieman

  • Guest
Re:AI behind tanks/apc
« Reply #6 on: 12 Jan 2005, 19:26:34 »
Again, the higher intensity explosions. Maybe some setpos fancy stuff, but as for real combat, I don't think it'd work.

Rockets tend to have the same problem that grenades did in earlier OFP versions. They seem to unload their exlposion everywhere through anything.  :P

Then any infantry hiding behind that abrams seems too close to those explosives. And would eventually kill them or "push" them out from cover.

"push", if you've ever expierenced it, is when your dude goes all weird and moves about 10m while his body is at a 45 degree angle, usually from a tank's main gun. :P

Offline Sparticus76

  • Members
  • *
Re: AI behind tanks/apc
« Reply #7 on: 11 Jan 2008, 09:12:40 »
If infantry are caught in the open with no other cover, they could use an armoured vehicle, but not right behind it, say 20 m or more to the rear of the vehicle from the direction of the enemy.