Jump to content
Sign in to follow this  
Undeceived

Reveal command useless? (AI night combat problems)

Recommended Posts

In order to make an AI (e.g. "John") shoot another AI ("Tom"), he will need a knowsabout of minimum 1.4, is that correct?

But how can I come up to 1.4 in the dark night? John won't get to knowsabout 1.4 because the AI is blind in the darkness... 1.4 will only be reached if Tom shoots first or runs like a headless chicken in front of John.

Now to the reveal command:

I made a trigger saying that John reveal Tom when John's knowsabout Tom is higher than 0.01.

The problem is that the reveal command will only set the knowsabout to 1.0. Which means that John will continue not shooting Tom because he needs 1.4.

Normally, when it is day, the knowsabout will rise from 1 to 1.4 or higher. But in the darkness it won't. That means that it will stay on 1.0, until Tom shoots or moves from his spot.

Does anyone have an idea how to raise the knowsabout in the darkness, since reveal won't work in this situation / will only raise it to 1.0?

Edited by Undeceived

Share this post


Link to post
Share on other sites

i believe something like this works:

1.4 = john knowsabout tom

and it will assign johns knowsabout to be 1.4, however u may need to increase it further if he doesnt fire.

Share this post


Link to post
Share on other sites
i believe something like this works:

1.4 = john knowsabout tom

and it will assign johns knowsabout to be 1.4, however u may need to increase it further if he doesnt fire.

No, it won't.

Share this post


Link to post
Share on other sites

Yeah, it isn't possible to set the knowsabout (unfortunately)... This is why I asked if anyone has a workaround or maybe another command (?).

But thanks, Igneous!

Share this post


Link to post
Share on other sites

Unfortunatley doTarget also makes no difference...

As a very very dirty workaround I'm using reveal + dofire + even adding NVGoggles for half a second. :D It works a little better, but of course this isn't good at all.

Too sad, but the fact that the AI only shoots when knowsabout is 1.4 but the reveal command only sets the knowsabout to 1.0 - it really seems to be a "bug" in the script language - or at least a "feature". ;)

Or can anyone enlighten me - would help a lot! Thx!

Edited by Undeceived

Share this post


Link to post
Share on other sites
No, it won't.

really?

i remember seeing a post before where someone deliberatly used 0 = enemy knowsabout player and had managed to deliberatly reset the knowsabout.

o well, so much for that.

Share this post


Link to post
Share on other sites
really?

i remember seeing a post before where someone deliberatly used 0 = enemy knowsabout player and had managed to deliberatly reset the knowsabout.

o well, so much for that.

I would say that in this case the 0 will turn into what the knowsabout number is.

For example, if the knowsabout is 1.2 and you write 0 = john knowsabout tom, then the 0 will become 1.2 and not vice versa.

But it won't work anyway because with 1.2 there is an spelling or syntax error anyway.

Share this post


Link to post
Share on other sites
i believe something like this works:

1.4 = john knowsabout tom

and it will assign johns knowsabout to be 1.4, however u may need to increase it further if he doesnt fire.

I would say that in this case the 0 will turn into what the knowsabout number is.

For example, if the knowsabout is 1.2 and you write 0 = john knowsabout tom, then the 0 will become 1.2 and not vice versa.

But it won't work anyway because with 1.2 there is an spelling or syntax error anyway.

Hi,

Take a look here.

_neo_

Share this post


Link to post
Share on other sites
Normally, when it is day, the knowsabout will rise from 1 to 1.4 or higher. But in the darkness it won't. That means that it will stay on 1.0, until Tom shoots or moves from his spot.

Does anyone have an idea how to raise the knowsabout in the darkness, since reveal won't work in this situation / will only raise it to 1.0?

Give them some light to make them see. For AI on a dedicated server, just create a #lightpoint on the server which won't show up on the player clients. Otherwise you have to make it more natural and make AI shoot flares into the air. However, this flare light doesn't make AI see better (bug I guess), but you can attach an additional #lightpoint to the flare to make them see.

A knowsAbout value of 1 is only about "who's there?", but it will be too dark for them to actually gather more information. Maybe it should increase the last few meters? But it does allow for some stealthy things even if it's not all that natural. Maybe it should be raised the few meters to 1.3 + (random 0.4)? At least it wouldn't be a consistent exploit.

So yeah, it's too dark for them to see. Give them light somehow: Daytime, #lightpoint, NVGs are the only options I can think of. Haven't tried searchlight.

Btw, I use this technique in a mission. When we shoot from far away (3-400 meters is far away at night), a fired eventhandler randomly reveals the shooter to nearby units. This makes them more aware, and they may send troops to investigate. They will also use flares with added #lightpoint to make them see, and that will be enough for them to actually attack us even if we know how to exploit the awareness in darkness caused by reveal.

I really wish the AI could be controlled better by using a simple useFlare command, firing a flare that actually makes them see, and that shooting nearby causes an automatic reveal based on caliber and sound - an M107 produces more sound - reaches further - than a silenced pistol :p

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

Well, light sources are not an option for my scenario... But thanks for your ideas.

I'm even using NVGs for some of the AI even though it is not a military scenario (it's about civilians). So I use it only to raise their knowsabout... And I remove the NVGs from them as they die. :)

About that technique you use: Can you show it to me? I'm urgently looking for something like that and maybe it will help me.

I have the following situation:

I (the player) have a buddy and he's the one who needs to get smarter in the night.

I have a small script that will improve his combat abilities (something like reveal + dofire, etc.) and I want this script to launch when his knowsabout of any enemy unit in a large trigger area reaches 0.0002... :)

Summary of what I need:

- A trigger area covers all possible enemies on the map

- The night-combat-improvement script should launch when my buddy's knowsabout of an enemy reaches 0.0002.

- The script will reveal the corresponding unit (knowsabout will be 1 then) and additionally will give him NVGs for a short moment (knowsabout should rise to > 1.4 so that he begins shooting).

The problem now is that I have absolutely no idea how to script that. :o

Any help would be appreciated!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×