Home   Help Search Login Register  

Author Topic: Urban Ai  (Read 8549 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
Re:Urban Ai
« Reply #30 on: 02 Feb 2005, 19:45:38 »
sorry i thought i didnt post it first time then i found out i did sorry

Offline Sentinel

  • Contributing Member
  • **
  • World is tough and I'm tougher!!
Re:Urban Ai
« Reply #31 on: 04 Feb 2005, 15:09:26 »
Are you having other ai-scripts running? It probably will cause problems.

In what situation you are using this?

Offline 456820

  • Contributing Member
  • **
Re:Urban Ai
« Reply #32 on: 04 Feb 2005, 17:15:55 »
i just tried it with one west and east infantry squad and that was the only script that was on at the time and throught the whole mission. when i activate it my men bunch up fine then just stay there when i tell them to move they just ignore the script and run around and get shot.

Offline Sentinel

  • Contributing Member
  • **
  • World is tough and I'm tougher!!
Re:Urban Ai
« Reply #33 on: 05 Feb 2005, 11:09:44 »
Did you init following variables?

UrbanAi = false
UrbanAiPos = false
EnableUrbanAi = player addaction ["Enable Urban AI","UrbanAi.sqs"]

RedHouse

  • Guest
Re:Urban Ai
« Reply #34 on: 09 Feb 2005, 20:33:54 »
i just read through this topic and going back i saw something about the grenadeir firing where you click on the map. i thought the best way to do this would be by useing the nearestobject command to get the grenade, then to setpos it at the location you want. You could also use things like the setformdir command to make it look realistic when the grenidier is aiming. You could do a check to make sure the grenidier doesnt end up fireing 20 km away. and you could relate distance to the amount of time it takes for the grenade to hit the ground. Hope thats some help

I know sentinal is completly capable of these things, cause hes better than me at scripting but its just a few tips for any of you who want to make this script.

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Urban Ai
« Reply #35 on: 11 Feb 2005, 06:07:06 »
Possibly use of the 'fire' command (So the AI Fires straight up, but looks like he's mortaring something) then use setvelocity?

STGN

  • Guest
Re:Urban Ai
« Reply #36 on: 12 Feb 2005, 19:25:51 »
I just saw this and thort great idear thi is what I have been sheaching for a long time, but I was a bit anoid but also sees alot of potential(I don't know enything about Scripting).

Right now this is a bit better than ingame pointing on the location you want the soldier and telling him where to look. cause as I see this is just a way to place your men a bit faster than what I just described. insted of having the squad stopping up and waiting for me to mark two points they should all move whit me in a collum whit 1,5m distance and only the last soldier should stop and cover then the second last soldier should stop at the next and so on, and when all had thier own point and I marked another then they should all move at the same time(not 1...ready,2....ready,3....ready) this way you could move thrugh the streets much faster not having to wait half an hour till they all have moved one point at a time.

Even better would be if you had two options where you could do as I just sugested and have an option to just hav the hole squad follow you in a close colum or a close staggered colum. you could also do so that you could select only one soldier. then mover to the point you would him to be and where he should point and the mark this just for him then he would move over ther and could be used for what ever you want.
STGN

Offline The_Mark

  • Members
  • *
Re:Urban Ai
« Reply #37 on: 05 Mar 2005, 16:39:42 »
I tried this few months ago, but haven't had the time to post here (read: I was too lazy), but nevertheless, this is a very good script; it makes AI behave believably in towns. Too bad it's only for the player's squad. Regarding this I got an idea, although it would require a lot of work it's possible (well, with most of it already done, just scroll through script snippets), and would make OFP a completely new game in towns.

Pre-define the nodes with a few parametres like a firing sector, the direction from which it prevents getting shot at, prefarable stance etc. For example: [[12345.2,1234.5,0],90,180,"crouch"] = [[node position], fire sector=east, covers from fire coming from south, crouch while in the node (if possible)]

Then make a script which is monitors if the squad is in a noded area (i.e. town) and if he is, it checks if there are any known enemies in the area. If is, it uses a threat matrix-type script to identify threats and according to them it assigns the squad's members nodes to use in order to defend, attack or withdraw from an area.

That's the idea in a nutshell. Imagine fighting in a town against AI that uses dynamically cover, advances with fire support etc., kinda like in CoD, just in OFP  ;D
Silent enim leges inter arma.

Offline lendrom

  • Members
  • *
Re:Urban Ai
« Reply #38 on: 05 Mar 2005, 17:00:37 »
@The_Mark

Quote
Pre-define the nodes with a few parametres like a firing sector, the direction from which it prevents getting shot at, prefarable stance etc. For example: [12345.2,1234.5,0],90,180,"crouch"] = [node position], fire sector=east, covers from fire coming from south, crouch while in the node (if possible)]

Quote
Would it be possible rewrite this script to allow mission designer to pre create those nodes (? i dont know how to name it not to be mistaken with mission editor waypoints)  and store them in a file so AI would automaticly chose way to the waypoint it is ordered by crossing the nearest nodes in the path? (oh that was too long sentence. I hope it was understandable  Some bots for fpp games (CounterStrike for example) used such a way to know the map - nodes of different types and relations between them. I dont know if it would work with OFP way-too-slowly-moving AI but mabey it's worth to try...

I suggested it on the firs page of this topic but either noone understood my english  ::) either noone thinks it's a good idea...  :'(  :P  ;)  :)
Blessed are those who have nothing to say and yet they remain silent.

Offline The_Mark

  • Members
  • *
Re:Urban Ai
« Reply #39 on: 05 Mar 2005, 17:31:11 »
lol.. Now as this has been suggested twice soneone HAS to try it. Sentinel could refine his script a big bit further, or if he wouldn't do it, I could try to do it (providing I have time for it.. I should be doing a poem analysis right now), if Sentinel doesn't have anything against it. Nevertheless, someone should do it.
Silent enim leges inter arma.

Offline 456820

  • Contributing Member
  • **
Re:Urban Ai
« Reply #40 on: 22 Mar 2005, 09:59:12 »
what does the action mark point or mark position do i tried looking where i wanted them to go the press enter but 2 just says ready and doesnt move and also they dont seem to follow me and when i give them a move waypoint they ignore the script and then get slaughteres

Offline supershooter

  • Members
  • *
  • 2+2=4
Re:Urban Ai
« Reply #41 on: 31 Mar 2005, 22:59:23 »
-------

I can see the advantage of this script but it needs more work. The Ai seemed a little unresponsive and it'd be better if they didn't come 1 at a time. I'd also like to point them to where they should go so I can be covering from a corner whilst they sprint from builbing to building. Developing from that point they can sometimes stop between buildings and open fire on the enemy. AHHHH!!! The idiots, why do they think I am sitting there shooting (no, I am not doing it for fun) - I am saving their damn lives. But despite all this I still realise how bad OFP is with urban combat. Thumbs up for a 100% improvement in OFP2!!!!!

- supershooter

Offline 456820

  • Contributing Member
  • **
Re:Urban Ai
« Reply #42 on: 03 Apr 2005, 16:12:00 »
and another thing if i tell my squad to move somewhere using 9,5,1,9 to tell them to move to the next waypoint they just run there normally. but it is very usefull if russians are heading my way except one genade takes us all out