Home   Help Search Login Register  

Author Topic: AI and fog  (Read 686 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
AI and fog
« on: 18 Jul 2003, 21:51:57 »
Hi! Got a problem again... This time itÂ's about this mission, with fog, and I want the AI to see through the fog, but they see as bad as I do, if not even worse(IÂ've got lots, lots of fog). Is there a way to make somekinda supervision to the AI so they can see through the fog? Or at least better than they do know. Plz help.

Thx in advance. :-*

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:AI and fog
« Reply #1 on: 18 Jul 2003, 23:23:52 »
I suppose you could try using

Quote
group reveal unit
Operand types:
    group: Object or Group
    unit: Object
Type of returned value:
    Nothing
Description:
    Reveal unit to group, do not care if it can know about it or not.

Example:
    soldierOne reveal soldierTwo

in a trigger activated repeatedly and set to go off if an enemy soldier enters in it's area.
Maybe something like this in the 'on activation' field

{[_x] exec "reveal.sqs"} forEach thislist

Code: [Select]
?count > 0: exit
_unit = _this select 0
count _unit = _imax
_i = -1
count = 1

#reveal
?_i >= _imax: exit
~0.1
_i = _i+1
MyGroup reveal (_Unit select _i)
goto "reveal"

The size of your trigger will determine how well they see. You'll have to name the trigger and make a loop script to move the trigger with the enemy. This won't propably work, but I think I just may be onto something here  :P
« Last Edit: 18 Jul 2003, 23:25:18 by Artak »
Not all is lost.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:AI and fog
« Reply #2 on: 18 Jul 2003, 23:47:26 »
OK, before I tried ur suggestion I made a small test with this reveal command. I put me and an enemy soldier on a plane surface and lots of fog. I revealed myself with the command. DidnÂ't move. DidnÂ't got killed. He wont fire even though he knows IÂ'm there. :'(

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:AI and fog
« Reply #3 on: 18 Jul 2003, 23:50:04 »
That's what I thought might happen  :-\ :P

We need a more complex script then. Something that will first revel the units to the enemy and then make the enemy 'dotarget' and 'dofire' the units they knowabout.  :D
Not all is lost.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:AI and fog
« Reply #4 on: 18 Jul 2003, 23:55:06 »
That's what I thought might happen  :-\ :P

We need a more complex script then. Something that will first revel the units to the enemy and then make the enemy 'dotarget' and 'dofire' the units they knowabout.  :D

Hmmm. I think I can do that. IÂ'll be back if I canÂ't. cheers!

EDIT: DidnÂ't work... I made a lil test again with first reveal, 1 sec after that, dotarget, 1 sec after that, dofire. No kills. IÂ'll have to lower the fog and put out more enemies instead. Even though I donÂ't like it.
« Last Edit: 18 Jul 2003, 23:59:26 by The real Armstrong »

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:AI and fog
« Reply #5 on: 19 Jul 2003, 00:11:41 »
Well what if the friendly and enemy can see both as bad in fog? That doesn't matter a lot does it? Think about it, it's been raining the whole night and most of the morning. Then the clouds go away and sun starts to heat the ground. It's still a bit dark, the sun has gone up 30 minutes ago and the fog starts to rise.. the player can't see a thing; the enemy might be just a few meters from him waiting and observing in the bushes. As the player scouts his way trough the heavy fog he sees a leg sticking out of a bus 2 meters to his right! OMG A SMALL ENEMY RECON SQUAD! The leg starts to move and a barrel of an ak47 is now pointig at you! BANG BANG BANG!!! Who was faster, the enemy or you?

That would make my adrenaline go up  :D
Not all is lost.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:AI and fog
« Reply #6 on: 19 Jul 2003, 00:35:39 »
Quote
Who was faster, the enemy or you?

me ;D

nd i had dat AK :P ;)

i think da prob is dat da comp also waits 4 clean aim not only 2 know bout units - so if he doesnt realy c da unit - he dont have clear aim  :-\ mebe try makin him move towards u nd hell shot u wen hes close enuf ? just make sure u set eim 2 open fire engage @ will ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta