Home   Help Search Login Register  

Author Topic: Individual Unit Morale - Probably not possible  (Read 398 times)

0 Members and 1 Guest are viewing this topic.

Offline Roni

  • Members
  • *
  • Play the Game !
Individual Unit Morale - Probably not possible
« on: 14 Jul 2004, 02:20:38 »
Hello All

This just an idle musing and is probably not possible to implement in OFP as it stands now.

I am working on a hunt and seek script that sends the hunting group towards the group target's last known position (LNP) by way of a setWPPos command.  The "radius of uncertainty" (RU) for the LNP starts at zero but goes up as time passes.  If the target is spotted by anyone (via a check of their knowsAbout ratings) then the LNP is updated and the RU goes back to zero.

All good and well and if I can pull it off it should be a pretty nifty script, even if I do say so myself !  ;D  8)

What I was thinking was finding some way to implement this on a unit by unit basis.  The knowsAbout (kA) rating has lots of flaws and is pretty limited but it could be a good start.  The idea would go something like this -

Each unit would have an array of "spotted" friends and enemies.  Each time a unit was spotted it would be assigned a LNP and UR, which would go up unless the kA rating for that unit also went up.  New units would be added to the array every time they were spotted with one exception - if the newly spotted unit was within another spotted units UR then the spotter would have a chance of treating them as the same unit.

Every few seconds a check would be made of the spotting units array to work out the number of friends and enemies it knew about.  If it had spotted more enemies then friends then it would start to think about running away, otherwise it would stick to its assigned goal.

In theory, this would allow for all sorts of neat effects, such as panic, berserk attacks (shoulder to shoulder against the unseen enemy !) and trying to get your squad to stand up and get out of that wheatfield (remember Thin Red Line ? !).

In practice, the kA command is a pretty blunt hammer.  It passes automatically between all units of the same group so one guys spotting immediately becomes another guys spotting.  Aslo, I'm not really sure how easy it is to direct the movement of a single unit out of a group.  Finally, of course, there is the lag issue.

The neat thing about this approach is that yoou wouldn't have to keep track of every single unit's knowledge of every other single unit (a squaring function).  Because of the overlap rule a unit may only be forced to a keep track of around a dozen or so guys at time - a geometric progression.  Individual unit morale for the masses !

A I said - I'm not sure whether or not this is even possible to implement but I thought that I'd throw it out there . . .   :beat:



Roni

Homefry31464

  • Guest
Re:Individual Unit Morale - Probably not possible
« Reply #1 on: 14 Jul 2004, 02:23:05 »
Sounds really good, good luck with it.