PDA

View Full Version : AI Turrets....



Inferno
July 18th, 2009, 07:01 PM
I'm trying to make a AI turret similar to snowbound. Unfortunately they act fucking retarded no matter what I do with the actor and actor variant tags.
They don't recognize a enemy unless I stand directly in front of it and shoot them in the face.

I really need these turrets to instantly see a player and continually shoot straight at them when they get in range (about 10 world units). Halp?

bobsam
July 18th, 2009, 07:04 PM
Couldn't you do it sorta in a way CMT did their Pelican Turrents?

Pyong Kawaguchi
July 18th, 2009, 07:05 PM
I'd suggest you do the trick to make an AI a vehicle (so they sync) and just make it so they cannot move, have a 360* FOV and give them a weapon

Or do the Ai vehicle thing, and put the AI in a vehicle

teh lag
July 18th, 2009, 07:57 PM
If it was up to me, I would use trigger volumes and (ai_look_at_object <unit> <object>) combined with forcing an effect that spawns projectiles to be created. I don't know how practical that would be to implement and what pitfalls could arise, but it seems like it would work.

ex (pseudocode)

if (volume_test_object turret1_patrol playerX)
(ai_look_at_object turret1 playerX)

...followed by something to force the AI to fire (thinking more, a script-spawned effect could be tricky to get working)

Inferno
July 18th, 2009, 08:46 PM
The AI look command won't work properly in MP. Also I'm using a modified actor_variant and actor definition from the Covie drop ship turret. Instead of being on a ship though its mounted to a little tripod.

I just need to figure out how to tag the ai properly so that as soon as I enter its sight range (which i set to 10 WU) it will shoot me till I'm dead. My stupid ai's for some reason can't see me at all even when I'm standing right in front of them. The only time they attack me is when I shoot at them.

Mythril
July 18th, 2009, 09:01 PM
What about giving your player biped a constant sound volume something other than "silent"?

Inferno
July 18th, 2009, 09:04 PM
I could try that.

Inferno
July 18th, 2009, 09:29 PM
No dice. Still just as stupid as ever.

I'm uploading a video of the stupid turrets. You can tell whats wrong with them better.

Sabre
July 19th, 2009, 12:02 AM
Have you tried setting the biped's default team as flood or something other than player.

Ganon
July 19th, 2009, 12:11 AM
I dont know if it will help, but area 53 has turrets that shoot on sight perfectly. The map is of course ripable so you should be able to take a look at the tags?

Inferno
July 19th, 2009, 12:37 AM
I'll try that. ^^

Also

http://www.xfire.com/video/f4d34/

BobtheGreatII
July 19th, 2009, 12:56 AM
Ha ha, as bad as that is, it's sort of funny. Are you going to get some real models going?

Inferno
July 19th, 2009, 01:04 AM
I have one. But I'm using the orbs as a test.

BobtheGreatII
July 19th, 2009, 01:50 AM
mmmk

Matooba
July 19th, 2009, 10:12 AM
i made one with sentinel tags. I just redid the model so it looked like a turret. I dont know about the script or if that would work for MP but i used it for a SP.

Siliconmaster
July 19th, 2009, 10:37 AM
Haha. The video made me laugh. If you can get this working, that would be really cool. Technically, because they activate on proximity, they don't move, and they can't die, won't they sync for all general purposes?

Inferno
July 19th, 2009, 01:08 PM
Yeah. I just have to use malolos AI sync script.