Home   Help Search Login Register  

Author Topic: Looking for defence scripts or something like it.  (Read 1279 times)

0 Members and 2 Guests are viewing this topic.

Offline Andre1983

  • Members
  • *
Looking for defence scripts or something like it.
« on: 20 Apr 2008, 21:37:56 »
Hi to all,
we wanne make a defence mission with more groups.
The AI should hold the line and not enage(don't run at) the enemy.

And if they run out of ammo they will run at an ammo-create and run back to his place.

i am not  looking for disableAI move command

IF
this is not possible i need  something els.
If the soldiers run out of ammo that they will surrendor.


André de Jong

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Looking for defence scripts or something like it.
« Reply #1 on: 21 Apr 2008, 14:17:32 »
Check out the setFleeing command in the ComRef. It prevents units from running away. This in combination with a HOLD waypoint would give the desired result. Not so sure about auto-rearming. Try searching the OFP forum for "AI  rearm" and see what happens.
urp!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Looking for defence scripts or something like it.
« Reply #2 on: 22 Apr 2008, 02:54:41 »
Aye....he means allowFleeing really.   :P


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

Offline Andre1983

  • Members
  • *
Re: Looking for defence scripts or something like it.
« Reply #3 on: 03 May 2008, 12:37:44 »
I will give it a try! thx for yours replies!

Offline schuler

  • Contributing Member
  • **
Re: Looking for defence scripts or something like it.
« Reply #4 on: 05 May 2008, 14:38:55 »
Hi André,
cool ,,, to keep ofp alive i will tell you this=
Quote
this allowfleeing 0; this setdammage -1;
place this in the AI enemys init. Not just the leader of the group!!!
note this damage only effects the enemy solders aim in firing of his weapon. Works great with the addon JAM3 too!.
Depending on the distance of the enemy it is fun to set their skill to ¾ or more,,,, makes for a lot of bullets flying around without friendly losses. 
also waypoints of[ hold] will keep AI in that area, [ as Mr. peanut said ]
 and a waypoint of [guard] with a radius is helpful too, but put AI on guard deep behind the front line. Then they will advance to help when they hear action on the front of the compound or base.
Have a play with that and have fun! :good:
Cheers Schuler
Semper Fi

Offline schuler

  • Contributing Member
  • **
Re: Looking for defence scripts or something like it.
« Reply #5 on: 06 May 2008, 06:03:46 »
check this http://www.ofpec.com/ed_depot/index.php?action=details&id=523&page=0&cat=xyz
modifiy it if you like!
note;;;;

Enemies that are out of ammo will also automatically surrender. You can then take the enemies captive, and make them follow you around. If nobody from your squad is within 100m of the captive, they will eventually run away.

Will work with ArmA modifying captive.sqs, and changing _unit switchmove "FXStandSurDead" by the move for surrender you want to use in ArmA.

("_x == {M16}" count magazines soldier1)
to count mags before the allowfleeing command
this setCaptive true; unitname playMove FXStandSur
cheers Schuler
« Last Edit: 06 May 2008, 06:05:32 by schuler »
Semper Fi