Home   Help Search Login Register  

Author Topic: AI Soldiers fall through the floor when the shooting begins.  (Read 548 times)

0 Members and 2 Guests are viewing this topic.

Offline Calamity

  • Former Staff
  • ****
  • Calamity Strikes AGAIN!
    • DataCraft Enterprises
Hey Guys,
In a vane attempt to recreate some urban combat for the player I have decided to force the player to do a house-to-house sweep of the objective town. I have successfully placed several units on each floor of every house in the town. The units are placed on their floor with a SETPOS command and have a HOLD WP right next to them. Combat type for each Soldiers WP is Aware.
During testing I set myself up as an enemy player and verified that every Soldier is in the right place, on the right floor, and stays put. However, once the shooting starts the AI Soldier hits the dirt (or the floor in this matter). Then they get up. Then they hit the dirt again. The Soldier continues this cycle until they fall through each floor and wind up on the ground floor. This behavior is no good for forcing the player to "clear" each house if by the time he gets there all the bad guys are on the ground floor and are easy pickings.
I can't turn of the AI for the Soldier or set the Soldiers WP to "Careless" because I want them to shoot out the windows. Or, shoot at anyone who comes up to their floor.
I think if the AI Soldier was only allowed to "Stand" or "Crouch", but not "Get Down" then he would not fall through the floor.
Any Ideas/Tips?

Calamity

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:AI Soldiers fall through the floor when the shooting begins.
« Reply #1 on: 03 Dec 2002, 21:46:04 »
Ah yes, the rigors of urban combat à la OFP ;) Gotta face it...the engine ain't really built for it (observe that throughout all of BIS's official missions, not ONCE was there a single person inside a house...not even Guba's mansion!). However, there is a solution to it:

unit setUnitPos "UP"

<- will force unit to stand at all times, thus eliminating the falling-through-floor thing (sometimes when put to 4x speed, you can even run through walls...fancy that...).

Oh, since they're already made aware 'tis not a problem, but observe that at least in 1.46 if you put a unit into the "UP" mode while they're safe, they're unable to unsling their weapons and start shooting :) Bugger that.

Other modes are "DOWN" and "AUTO" (self-explanatory)

good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"