yo dude. glad to see you've joine the DarkAI revolution. I guess from your post in my thread you wanted a hand so:
First up, I'd make your level in 2 parts. one X file for the full height objects, and one for half height objects.
Then us the AI add obstacle from level command for each.
You wanted to know about different factions...
First up, you'll need to create an array to store your faction names.
dim entity_faction$(50)
during your loading phase you will assign the entity a faction (as a string)
if entity_type$(i)="SMG"
if mesh=1 then clone object i,98,0 : texture object i,341+rnd(8) : entity_faction$(i)="yardie"
if mesh=2 then clone object i,97,0 : texture object i,355+rnd(4) : entity_faction$(i)="yardie"
if mesh>=3 then clone object i,98,0 : texture object i,350+rnd(4) : entity_faction$(i)="BNP"
then you must make sure you disable the entities ability to select it's own targets:
AI set entity can attack i,0
Ai set entity can add target i,0
this will prevent them from picking their own targets.
you can then use a variable to set whether the entity is aggressive or not.
so like (in prose)
if player shoots enemy i then
enemy_aggressive(i)=1
add whoever shot i to i's target list
if enemy i is aggressive you can then run attack gosubs on it
you can then make all enemies from a particular faction target and attack enemies from opposing factions who are aggressive.
police can attack anyone set as aggressive.
out of interest, how high can you go before DarkAI crawls your CPU. I can't get more than 40 without it dropping to 10FPS on me (if I disable entities more than a certain distance away I just get "AI entity does not exist" messages...doh.)
Hope that helps dude. Any issues or whatnot give me shout. My NPCs currently have 34 variables each, so it's a bit difficult to post my code for you without having to do alot of explaining about what each variable does!