Home   Help Search Login Register  

Author Topic: Knowsabout  (Read 844 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Knowsabout
« on: 08 Dec 2004, 23:46:30 »
This is one tricky bastard. At least I found it that way.

I'm making a grouplink script, so for the spot/despot unit script I've put together a simple knowsabout check to see if unit knowsabout blahblah > 0.105, whatever. Then I setmarkerpossed a marker there, following the spotted unit. The problem is the despotting.

Everybody knows how the knowsabout command works right? 0.105 being the magic number and slowly decreasing and blah blah. If not have a look at the online ComRef.

Anyway, once someone has seen the unit up close or through binoculars, the number is up high, something like 3. But from a distance, but still visible, it's down at like 0.5. Now, because the knowsabout command works in such a fucked up way, at least in this case, the player will be able to follow the spotted unit via the marker if he seen him up close or via binoculars. Problem is, since this number's highpoint was 3, he'll continuesly see this unit for like ages untill it has dropped below 0.105, even if he's moved away since long. So why not raise the condition to like 1? Because a guy spotting someone from a greater distance (or not looking through binoculars) , say, 0.5 and is firing at 'em sunuvabiatches won't count as a "spot".

How will I solve it then? Best way, I figure, would be to continuasly set the knowsabout number to 0, and then do a new knowsabout check all the time. However, I don't know if this is possible. Anyone know or have any other ideas?

Please help me, I'm just like two inches from beta stage. :'(

:beat: *Gets Shot* :beat:

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Knowsabout
« Reply #1 on: 09 Dec 2004, 00:24:04 »
What are you actually trying to 'spot': the 'most known-about' unit, the 'most-recently noticed' unit or something else?  Can't quite work out what you're trying to do with it.

You can't set the knowsabout.  I don't think breaking the line of sight instantly reduces the value, think it just decreases quicker, otherwise SetPossing the the spotted unit out and back might have some effect.


Unnamed

  • Guest
Re:Knowsabout
« Reply #2 on: 09 Dec 2004, 02:15:44 »
I messed with this a while back. If I remember correctly, it was impossible to tell exactly why the KnowsAbout value was decreasing.

But because the KnowsABout value increases almost immediately, opposed to decreasing over time, there is a work around. Like you said setting the knowsabout value to 0 instantly, then checking again would solve this problem. But you can only do this by deleting the unit your observing, and creating a new one. Which might not be practical?

You could try camcreating an invisible target (using the addon) at the position of your target guy, check the knowsabout between you (the observer) and the Invisible target, then delete the invisible target. This way you can get an almost instant and true knowsabout value on demand for any point on the map. It wont tell you if the guy is prone, standing or running, but it will tell you if you have a direct line of sight on his map position.

I got this working very well using my own addons, never got round to packaging it up into a usable system. But then, you're the first person I've seen since, to come across this particular problem.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Knowsabout
« Reply #3 on: 09 Dec 2004, 12:15:02 »
Hmmm, actually had that in mind but was afraid of using it for two reasons:

1. If player spots with binoculars first, then it won't register when I check the invisible guy.
2. It requiers and addon, and I'm up at 4 already.

Wait, wait, wait, wait! Ohhh! I just had the best idea! What if I use this together with a math script? Then I can be extra sure. I'll get back to you and see what I've found.

:beat: *Gets Shot* :beat:

EDIT: Oh, and do you know where I can find any of 'em invisible targets, once and for all?
« Last Edit: 09 Dec 2004, 12:15:35 by dmakatra »

Unnamed

  • Guest
Re:Knowsabout
« Reply #4 on: 09 Dec 2004, 19:05:45 »
Quote
1. If player spots with binoculars first, then it won't register when I check the invisible guy.

I'm not sure what you mean?

Quote
2. It requiers and addon, and I'm up at 4 already.

You might be able to get away with a gamelogic, I used addons because I wanted the target to be un-missable from as far away as possible, so I changed the config. It was the only way I could find to instantly reset the KnowsAbout level.

KnowsAbout seems to work on the group level, what if you moved the Observer into a new group, would that reset the KnowsAbout value?

I kind of gave up on the idea, a complex work around for what could have been a very simple BIS reset script command.

You can download the Invisible Targets here, I think this is straight from the aurthor. But BAS have there own version to:

http://www.aef-kampagne.de/german/k_download.htm

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Knowsabout
« Reply #5 on: 10 Dec 2004, 22:41:57 »
i have found a problem with ofp that might affect your invisible targets idea.
when i was new to commands, i use a getpos command and i setpos'd an enemy really close to me, and i didn't register to him at all, until i shot all around him for about 2 mags. so i fear the knowsabout won't register on the invisible target because the ai is actually the one "knowing" about it, no matter how well you can see it (obviously it can't check how much you know)

Unnamed

  • Guest
Re:Knowsabout
« Reply #6 on: 11 Dec 2004, 10:17:24 »
Quote
setpos'd an enemy really close to me, and i didn't register to him at all

Yeah, you have to move before he registers your presence. But you can use DoWatch to trigger the same thing. Of course this means Dowatching the invisible target, then Dowatching your original target. Which just adds another layer of complexity.

My original idea was to camcreate an invisible Observer with super eye sight. Then delete him along with the invisible target, so Dowatch was an easy solution to that particular problem.

Strango

  • Guest
Re:Knowsabout
« Reply #7 on: 26 Jan 2005, 18:12:24 »
Did you guys ever find any good solutions?

I'm working on a script to simulate radar coordination with SAM sites.  When an aircraft goes above some pre-set altitude a reveal command is done on the aircraft for all the SAM sites.  My problem is the need to reset the knowsabout of the SAM site when the aircraft dips back down below the altitude breakpoint.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Knowsabout
« Reply #8 on: 01 Feb 2005, 01:18:36 »
Just an idle musing - does anyone know if this would work ?

Create a script that creates a game logic at the same point as the target unit.  The script should then continuously record the last two known positions of the target unit say, every second or so.

If the unit is deemed to be "visible" (ie is above a certain height or one or more enemy groups has a knowsAbout rating against it above a certain threshold) then the script moves the game logic to the target unit's position, otherwise it moves it to a projected point based on the last two known positons.  Eg - if the target was last seen moving SW at 50 m/s then the game logic will be projected to move 50 m/s SW every second until the target is once again spotted, even if the target unit doubles back, jinks or whatever.

Then all you do is direct the tracking units to doWatch the game logic rather than the target unit.  What this should do is force the tracking units to aim at the target units projected position, not it's real one.  And every time the target unit pops up the baddies will once again aim directly at it.

Can anyone see any problems here ?

Hope that this helps.

UNN

  • Guest
Re:Knowsabout
« Reply #9 on: 01 Feb 2005, 03:41:55 »
Quote
I'm working on a script to simulate radar coordination with SAM sites.  When an aircraft goes above some pre-set altitude a reveal command is done on the aircraft for all the SAM sites.  My problem is the need to reset the knowsabout of the SAM site when the aircraft dips back down below the altitude breakpoint.

Along the lines Roni suggested. But when the aircraft rises about 50m, create and loop a Game Logic (or perhaps an Invisible Target http://www.aef-kampagne.de/german/k_download.htm) to follow the aircraft closely. Then reveal the Game Logic\Target to the SAMS.

When the plane falls below 50m, just delete the game Logic (That should set KnowsABout value to 0). I think this will reset the SAMS target, assuming the SAM cant detect an aircraft on it's own. Deciding when to fire (revealing the aircraft as the real target) is another thing, but you could play around with the KnowsAbout value you get from the GameLogic.
« Last Edit: 01 Feb 2005, 03:43:45 by UNN »