Home   Help Search Login Register  

Author Topic: Swatlevel with buildings  (Read 831 times)

0 Members and 1 Guest are viewing this topic.

fmv_game

  • Guest
Swatlevel with buildings
« on: 24 Jun 2004, 15:38:27 »
Hello!

Im creating a mission and I would like the bots to enter buildings and clear it.
Now I was woundering what I need to do in order for the following to happen.

Me standing outside a building. Selecting a group of men and pointing at the building
and say: Clear that building (or simular).. The team moves in and enter each room and kill all
enemies. How is this done?
Let say there are several buildings to clear. Must I create a set of waypoints inside the buildings
and have a group of waypoints inside each building. What I do???
This is a basic SWAT-mission combining inside and outdoor environments
Need to know. Thnx..

 :o
« Last Edit: 24 Jun 2004, 15:40:25 by fmv_game »

Offline Blanco

  • Former Staff
  • ****
Re:Swatlevel with buildings
« Reply #1 on: 24 Jun 2004, 16:42:44 »
Try this

Place (lock it) a SEARCH & DESTROY, LIMITED SPEED waypoint on the house.

I 'm working on a script where AI is able to guard through the windows and doors in crouch or stand position (custom anims). When an enemy enters the room and try to kill him from behind he turns his back and start to fire.


 

 
« Last Edit: 24 Jun 2004, 20:50:33 by Blanco »
Search or search or search before you ask.

fmv_game

  • Guest
Re:Swatlevel with buildings
« Reply #2 on: 25 Jun 2004, 22:16:13 »
ok..that sounds great in order to get your enemies to do what they should..
But you want your teammates to enter a building on command and when telling for example team red. Clear building 1.. then they should run into the house and systematically go through the house, following perhaps some sort of waypoints.. There are more than one house also

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:Swatlevel with buildings
« Reply #3 on: 26 Jun 2004, 02:52:18 »
it won't happen, ofp ai is terrible at navigating through buildings

fmv_game

  • Guest
Re:Swatlevel with buildings
« Reply #4 on: 27 Jun 2004, 12:56:58 »
So what in gods name are the the AI-paths for? I thought
those where to make the AI work itself around?
« Last Edit: 27 Jun 2004, 12:57:06 by fmv_game »

DBR_ONIX

  • Guest
Re:Swatlevel with buildings
« Reply #5 on: 27 Jun 2004, 14:34:54 »
They are.. Thats the thing :P
They AI always suck with buildings..

Tis a shame it tis :(
- Ben

FlidMerchant

  • Guest
Re:Swatlevel with buildings
« Reply #6 on: 27 Jun 2004, 23:28:52 »
It could work for a co-op mission, with a bit of scripting and use of the init field and triggers, the AI can defend buildings resonably.

fmv_game

  • Guest
Re:Swatlevel with buildings
« Reply #7 on: 28 Jun 2004, 09:23:03 »
But not Overrun buildings?

If not why then use AI-paths if they cant move around inside a building and take em out?


Also.. Anyone know a good tutorial bout how to make these AI-paths.. I tried
using O2 and some schmucks Tut, but still error. They run through walls and shit. Even though I
have created a geometry lod and tried to run through it myself, I cant. So the col works, not for the AI though. Also shit with paths is up the walls

ScrubMuncher

  • Guest
Re:Swatlevel with buildings
« Reply #8 on: 29 Jun 2004, 15:10:42 »
So there's no way to extract the AI positions in a building to an array, give the command (sequentially) to goto the position, and upon 'ready' from soldier, goto the next? (and when the end of the array is met, return to formation?)... bummer.  I was really thinking that would work nice.  :-\

Offline Blanco

  • Former Staff
  • ****
Re:Swatlevel with buildings
« Reply #9 on: 29 Jun 2004, 19:10:45 »
From the comref :

building buildingPos index
Operand types:
    building: Object
    index: Number
Type of returned value:
    Array
Description:
    Returns given indexed position in building, returned value is in format Position

Example:
    buildingPos [building, 1]



Never tried it, but it returns an array, probably a position array with x.,y coordinates...

Maybe you can make a script (for a building with 4 positions)

[bob,object XXXXX] exec "clearbuilding.sqs"

Code: [Select]
_unit = _this select 0
_building  = _this select 1

_pos1 = buildingPos [_building, 1]
_pos2 = buildingPos [_building, 2]
_pos3 = buildingPos [_building, 3]
_pos4 = buildingPos [_building, 4]

_allpos = [_pos1,_pos2,_pos3,_pos4]

_i = 0
#lp
_unit domove (_allpos select _i)
~1
@unitready _unit
~5
_i = _i + 1
?alive _unit && _i < count _allpos : goto "lp"

hint "building cleared"
exit





« Last Edit: 30 Jun 2004, 16:47:32 by Blanco »
Search or search or search before you ask.

fmv_game

  • Guest
Re:Swatlevel with buildings
« Reply #10 on: 30 Jun 2004, 08:43:18 »
Looks great, but how do I know where these positions are in the house, and ALSO prevent the AI from entering the building through the walls

AnarCHy

  • Guest
Re:Swatlevel with buildings
« Reply #11 on: 30 Jun 2004, 09:11:32 »
Quote
Looks great, but how do I know where these positions are in the house, and ALSO prevent the AI from entering the building through the walls

Ok, I've got an idea.
(takes a deap breath)
Well, you'd have to do either some pretty nasty bits of scripting with a LOT of setpos and stuff or make an O2 building with pos1, pos2, pos3, and pos4 as "markers", AND/OR make a script to use with any building with markers that've been setpos'ed up there arses, then have waypoints that can be used systematically by any unit that enters the house, and make an action (through the action menu) that activates the AI way of getting through (WHEW, out of breath).  THEN with that script you could select let's say 2 and punch 6 and then whatever # the action the script has created is.
Then 2 would search the house going from pos1 to pos2 to pos3 to pos4 systematically (maybe even in a random order...?), the houses do have paths for the AI to use when the unit is already in the house and moves on its' own, and this script WOULD NOT AFFECT that, so 2 would have to use the AI paths to navigate the house.  (wow, I made some sense...? maybe even a little?)

That wasn't too rough now, was it?

Only downside to this would be a hellufalotta scripting, as well as O2 editing.  You'd have to re-release whatever island you'd made this mission on with the new buildings, etc.!  (a lot of work)

I have a great knowledge of scripts and O2, but I hate O2 (too d**n tricky), and I suck at writing the scripts,  I always misplace things inside them.  Sometimes I add random things into the script that has nothing to do with OFP at all (I once started to write a story inside one...   ???  hey, man, don't ask me.) - I may have been a little drunk too (heheh).

fmv_game

  • Guest
Re:Swatlevel with buildings
« Reply #12 on: 30 Jun 2004, 10:00:24 »
a great.. I write it again then, damn timeout..

ok.. I got a building, but pointing at it in opf it doesnt say "HOUSE" as original buildings in OPF.
What is that about?

Also, the AI thingy : I got it to follow a path inside but.. I click close to the entrance and it enters
quite allright. I click further in, it wollows the path and everything is allright. I click outside it runs out, but sometimes through the wall.. Anoying. Guess that is something Ive have to live with.
Hate the AIpaths *#¤*%&#*¤&*#¤%*... The guy runs alittle bit as he likes. I just clicked outside throught the wall/floor, I thought it still was inside, but It took a shortcut through the door/wall and the turned around and entered the room through the wall.. Why?

About the scripting, sure I kinda figure its alot of shitty work, so I think I take do that later.
But if you know how to make it to be a building I'd be happy as hell..
I add the building so you can see the paths Ive laid out. Perhaps its something there that I need to change.. Also the config file,, Its not that it cant be without it seems. Nothing happens if I loose it.
« Last Edit: 30 Jun 2004, 10:02:16 by fmv_game »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Swatlevel with buildings
« Reply #13 on: 30 Jun 2004, 20:58:15 »
Quote
ok.. I got a building, but pointing at it in opf it doesnt say "HOUSE" as original buildings in OPF.

I think you need some named properties in the Geometry LOD.

class.......house
dammage.......building
map.........house


Planck
I know a little about a lot, and a lot about a little.