Hello, im TheLastSurvivorFPS and i have one question.
Im creating a platform shooter and i programmed this.
The Player has a 9 mm, the player only can shot 2 bullets every second
Gravity and puzzles
Enemies can dead
but I have some troubles:
The Enemy ever follows the player and it ever stay in air floating, i put gravity to the enemy but, donīt work
The Enemy ever shots (but no at the player)
I Want to do this
- the enemy have a machinegun, i want when the enemy shots 30 bullets needs reload
- the enemy shots at the player
- when the player walk near the enemy shot at the player and follow it (no floating)
- when the player is not near the enemy, it stop shooting and stop follow the player
Please Help Me!
How I Can Make A Enemy A.I In Game Maker
Started by TheLastSurvivorFPS, Aug 25 2010 11:30 PM
3 replies to this topic
#1
Posted 25 August 2010 - 11:30 PM
#2
Posted 26 August 2010 - 12:36 AM
for the gravity put
if place_free(x,y+1)
gravity=.5
else
gravity=0
for the following put
if !(collision_line(x,y,obj_player.x,obj_player.y,obj_wall,0,1))
{
if obj_player.x<x
x-=4
else
x+=4
}
if place_free(x,y+1)
gravity=.5
else
gravity=0
for the following put
if !(collision_line(x,y,obj_player.x,obj_player.y,obj_wall,0,1))
{
if obj_player.x<x
x-=4
else
x+=4
}
Edited by wai0001, 26 August 2010 - 12:36 AM.
#3
Posted 26 August 2010 - 02:02 AM
tanks wai001, it helped me a lot!
#4
Posted 26 August 2010 - 04:45 AM
http://gmc.yoyogames...howtopic=346470 might help with the enemies.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











