Eh....
Dzięki.
a niewiesz przypadkiem gdzie moge znaleźć ai policjanta?
ja to sobie przedstawiłem tak:
if instance_exists(trup) then
instance_find(gracz,n)
if point_distance(x,y,gracz.x,gracz.y) < 300
{
sees = 1
}
else if point_distance(x,y,gracz.x,gracz.y) > 300
{
sees = 0
}
if sees = 1 && ammo > 0
{
instance_create(x,y,naboj)
ammo -= 1
}
if ammo < 1 && instance_exists(ammo)
{
move_towards_point(ammo.x,ammo.y,5)
}
else if ! instance_exists(ammo)
move_towards_point(gracz.x,gracz.y,5)
if ammo > 1
{
speed = 2
}
if health < 100 && instance_exists(hp)
{
move_towards_point(heal.x,heal.y,5)
}
else if ! instance_exists(hp) && ammo > 0 && sees = 0 && health < 100
{
instance_create(x,y,naboj)
ammo -= 1
sound_play(strzal)
}
if health < 1
{
instance_destroy()
sound_play(smierc)
}
else if health > 100
{
health = 100
}