Home   Help Search Login Register  

Author Topic: AI behaviour - firefight  (Read 647 times)

0 Members and 1 Guest are viewing this topic.

gssd_forceleader

  • Guest
AI behaviour - firefight
« on: 10 Aug 2003, 14:57:13 »
I would be pleased if anybody could give some hints.

I was intended to make a scenario with some fortified check points on Nogova island. I made two scripts, one to set up the men at the checkpoint if there is no visible danger for them - lazy behaviour, patroling and standing around or sitting behind cover, watching in some directions etc. The second script changes to high readiness state - they are now awaiting an attack and should try to defend. This was quite easy for me. The problems occured as i tested the scenario. The troops don't fight behind sandbags, because they are lying/tacking cover. Only the machinegun guy always lying in the fortress returned fire (it has a window on the ground..).

As i served in army, we were trained in basics of firefight and fending off an infantry assault "Returning fire is more important than taking cover". BIS made good work, the AI soldiers take cover when there is fire but they need more time to stand up as my grandmother. On my opinion a bunker crew should not hide until the enemy is in range to kill them with handgrenades.

Is there a way to control the "take cover" behaviour or to decrease stand up times ? How can i make them kneel behind sandbags ?

please help

greetings !
« Last Edit: 10 Aug 2003, 15:11:42 by gssd_forceleader »

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:AI behaviour - firefight
« Reply #1 on: 10 Aug 2003, 15:26:54 »
This is what i use in such situations:

soldier_1 setUnitPos "UP"; soldier_1 disableAI "MOVE"

In your case you need to give each soldier these commands, so make a loop with all soldiers in it.

And set the damage of all sandbags / fences to 1. (this setdammage 1;)
That way units can fire over obstacles more 'easily'. Undamaged sandbags seem to confuse them in a way. I think you should search for a script called 'Smart AI trench cover', it makes use of this.
« Last Edit: 10 Aug 2003, 15:36:10 by DrStrangelove »

gssd_forceleader

  • Guest
Re:AI behaviour - firefight
« Reply #2 on: 10 Aug 2003, 16:47:13 »
Thank you DrStrangelove.

It works good. The soldiers do now await the enemy shoot, hehee.