Game Development Community

Ai help. making them easier and shoot straight ahead.

by Luke Smith · in Technical Issues · 05/29/2007 (12:25 pm) · 6 replies

Hi. I need some help with the AI i am using. I'm using the resource entitled Artificial Intelligence Beginning by Mark Holcomb found here:

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6742

The bots kick my ass and I need to make it easier somehow. I am making a 3d platformer game and have restricted movement to only forwards and backwards disableing left and right. this makes it incredibly hard to avoid beeing hit. for the player the mouse is restricted also which meens you can only shoot straight ahead.

How could I make it so that the bots can also only shoot straight ahead. This would enable you to duck to avoid bullets.

How can I change the player model so that the enemy isnt the default player model and is a different player model?

Also when I shoot straight ahead by projectile (default crossbow) only fires for a certain range and then hits the floor. does the projectile get pulled down by gravity like a realy projectile? im pretty sure the ground is completely flat or prehaps my crosshair isnt set to directly straight ahead? any Ideas how I could fix this?

Finally is there any other ways I could make the ai easier so you can kill them quite easily?

Thanks alot!

regards

Luke

#1
05/29/2007 (1:01 pm)
Have you tried the aiguard resource? www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6773
#2
05/29/2007 (3:21 pm)
How will that solve my problems though? As far as I can see the aigaurd is an ai enemy that waits on the spot untill it sees the apponent and then attacks. I chose the first because it follows a path untill it sees an apponent which is what I wanted.
#3
05/29/2007 (3:55 pm)
All the AI aiming is done thougth the AiPlayer::aimAt function i think (or somthing similar). What you could do it get the x and y co-ordinates of the player, and get the bot to aim there but have the z co-oridinate of the aim be his z co-ordinate. That would make him shout straight-ish. It may need to be modified a bit, depends where on the model the z co-ordinate refers to.
#4
05/29/2007 (5:09 pm)
Oh thanks yeah it was I just adjusted the height to suit my needs. I made it abit easier adjusting the distance you have to get before they notice you.

Any Ideas on how I can change the bots player model to a different one. I have managed to change the model by adding:

Shapefile = "link to my file"

in the

playerdata(demoplayer : playerbody)

datablock in aiplayer.cs however the animations dont work with it now. Any Ideas how to fix this. its the same model copied over with a different texture just for testing so I know the animations do work.

Also any ideas on how I can adjust the delay between firing the crossbow. I edited it for the aiplayer in aiplayer.cs but I cant find it anywhere fopr the player even in the hardcode.

Thanks alot;
#5
05/29/2007 (6:03 pm)
Take look in data/shapes/player for player.cs. That your animation script, make you have it correct. Look at this line " datablock TSShapeConstructor(PlayerDts) ". It cannot be the same in each cs file, if so animation will not play for the other dts. Make sure you have it exec in the player.cs in server/script at the top.
#6
05/30/2007 (2:47 pm)
Weapon spread. Makes things easier for me. NOTE: Remember to read the comments on this resource. There are two bugs that need to be fixed.

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1714