Author Topic: Visibility effects how well AI can see you.  (Read 1103 times)

It would be cool if your visibility on dark maps effected how well AI can detect you.

- If you are in pitch black, they cannot see you.
- If you have your L light, they will be able to detect you.
- If you are under the effects of an event light (Wrench-ing bricks to set a light to them), they can see you.

Ok, I realize that this is Impossible, so don't go on telling me "NU U CNT DO THIS, ITS IMPOSSABLE!!!1!!!2!!!"

Just an Idea....


Its a good idea! But...
"NU U CNT DO THIS, ITS IMPOSSABLE!!!1!!!2!!!"

Lol. Just kiddin.

If we had detection level events...

Actually, this is possible, just not with shadows created by interiors.

This can be improvised to become possible. One can manually set up the bots AI to change if the map is named "Dark" or some specific variable is low. Light turning on could also set to trigger AI being able to find you. The only problem may be being in the proximity of a light, but that may be fixed with onPlayerTouch or something around the light.

Have the bot look for lights in dark maps and if there's any players within the light's radius, the player is spotted.

One can manually set up the bots AI to change if the map is named "Dark" or some specific variable is low.
No, shutup.
You can just use the level's lighting.

Also, just radius search for bricks with lights and check to see if you have a light on.

Have the bot look for lights in dark maps and if there's any players within the light's radius, the player is spotted.

Seems nice, although I feel kind of iffy about having to set up a cycling radius search for every light like that.

No, shutup.
You can just use the level's lighting.

Also, just radius search for bricks with lights and check to see if you have a light on.

I only said that because some people make maps and set the default light differently... meh, never mind that part.

Seems nice, although I feel kind of iffy about having to set up a cycling radius search for every light like that.
If you feel uncomfortable with plenty of radius searches (I've used plenty in the past without too many problems), you could instead cycle through the list of clients and check the distance between their player's position and the light. The problem with this is that bots wont see other bots.

If you feel uncomfortable with plenty of radius searches (I've used plenty in the past without too many problems), you could instead cycle through the list of clients and check the distance between their player's position and the light. The problem with this is that bots wont see other bots.

Meh, they could if you also made a bot search.

Off Topic: HEY, I got my own AI problem. I've been too lazy to figure out how to make bots orbit players in a perfect circle. For years, to make them orbit, I'd just make them stop at four points around the player.

Have them look at the player and get the vector pointing to the right or left of the bot. Do this constantly.

Have them look at the player and get the vector pointing to the right or left of the bot. Do this constantly.

Vectors confuse me, that's the main reason my bots don't work perfectly. The most my bots do is calculate distance and stop at 2 spaces away or something. I need the script for that, but you don't need to make it.

A vector is like a direction measured in xyz positioning instead of rotation.

A vector is like a direction measured in xyz positioning instead of rotation.

I know that, I mean I don't understand the commands and such for it. Normalize... I don't even know what that does, what it means to do. All that stuff confuses me, it's too much like homework.

Normalize turns it into a direction that would add up to 1 unit total. This is useful if you want it to always be a certain scale when the distance between the two positions can vary.