Home   Help Search Login Register  

Author Topic: Urban area's ... obsticles  (Read 1681 times)

0 Members and 2 Guests are viewing this topic.

Seabiscuit

  • Guest
Re:Urban area's ... obsticles
« Reply #15 on: 29 Jan 2005, 00:28:53 »
A bullet would damage what it runs into wouldnt it?
What about using the invisible H or invisible targets?
And will this really work?
Triggerhappy, you mentioned the clipping problem.
I've noticed many times that AI will just walk through walls when I place them inside a building and give them a move command.
And using a setpos I can set units in the middle of a wall or halfway between a floor without affecting them at all.

It would seem to me that as far as groups and formations are concerned, units need only to determine where their next highest ranking member and perhaps next subbordinate are, not every member of the group, therefore they only track the position of 2 objects.
This would be a simple binary tree one person/branch on the tree dies and the leaves fill in(too many programming analogies?).
As for all the other objects, AI seems to be mostly oblivious to them in their natural state except that they cant walk through most of it(exception above).
When you place a group and tell them to attack they dont care what's in the way, tree or house, they move toward it.
If the group is in formation, they hold that formation even if units end up in the water or outside a building or whatever.
In fact the AI can see right through objects right? (not sure if this is true for buildings but certainly for trees and shrubbery)
They take little consideration to windows or doors when inside a building shooting out and wont bother hiding (the best they can do is lay down and stay in formation).

Not trying to bring the ideadown , just thinking out loud.
I really hope this works out cause it would be like having a nearestNonClippingObject function in addition to nearestObject.

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Urban area's ... obsticles
« Reply #16 on: 29 Jan 2005, 08:10:55 »
Yes, that is exactly the point. The AI's use of cover is abysmal, because the ai has no concept of 'cover' as it applies to shrubbery, houses, trees etc.
The point of the function would be to allow the ai to at least have some concept of not being able to 'see' another player, and either use this to their advantage (cover) or get around it as a problem (hunting a player)

edit: anyhow, here is my old workaround for the lineofsight problem. Uses projection vectors and such. Cheers to Machoman, i used his vector funcs
« Last Edit: 29 Jan 2005, 08:36:27 by Fragorl »

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Urban area's ... obsticles
« Reply #17 on: 03 Feb 2005, 04:49:51 »
And after thinking about it for a while, i have another possible solution. It's more complex than just using a function, and has some undesirable aspects, but it is quite usable.

If we're using a bullet to do the line of sight check, and requiring it to move with a certain velocity, then there'll have to be a looping/checking aspect, which means a script. So think of this as sort of a latent function. There is a gap between when you start the trace and when you get the results of the trace (if and where an obsticle was encountered), but if you're prepared to have a short wait in your ai script or whatever (the length of the wait depends on how far you want to do the trace), then there is no reason this shouldn't work.

EDIT June 3 2005
Script posted here originally is out of date. New version will be completed soon
« Last Edit: 03 Jun 2005, 03:04:12 by Fragorl »