YesNoOk
avatar

Making the AI ignore Projectiles. (Read 3933 times)

Started by 0WNT, April 08, 2013, 01:01:49 pm
Share this topic:
Making the AI ignore Projectiles.
#1  April 08, 2013, 01:01:49 pm
    • Portugal
    • anxl37y.gaming@gmail.com
Hello everyone, I'm still a noobie trying to code a WIP of mine. I Came to a stall, and maybe u guys with more knowledge on this area could help me.

I'm trying to make my character to look like a final boss. I Gave him super armor against Projectiles only, and now i want him to ignore projectiles. I'm coing the AI, and I want the AI to just walk trough the projectiles and do whatever it wants without minding the projectiles coming and trying to block them.

With the limited knowledge that i have so far, i have no idea how to code this, is there anyone of u guys who already made this or could give me some tips on how to possible code this?

Thank you in advance.
Re: Making the AI ignore Projectiles.
#2  April 10, 2013, 10:44:19 am
  • avatar
  • ******
    • Thailand
What do you mean by "ignore"? What's he doing that you don't want him to do? Guarding? What?
Re: Making the AI ignore Projectiles.
#3  April 10, 2013, 04:34:57 pm
  • ******
  • SNK is life
Re: Making the AI ignore Projectiles.
#4  April 10, 2013, 04:41:17 pm
    • Portugal
    • anxl37y.gaming@gmail.com
What do you mean by "ignore"? What's he doing that you don't want him to do? Guarding? What?

Yes, guarding. Since it has a super armor for projectiles only, I want the AI to just walk normally as if no projectile is coming on its way.
Re: Making the AI ignore Projectiles.
#5  April 10, 2013, 05:14:54 pm
  • avatar
  • ******
    • Thailand
You can detect if your character is in inguarddist while your enemy's movetype != A. That would mean that a helper or projectile of some sort is attacking and not your enemy, and you can stop your character from guarding during those instances.

Unfortunately, helpers are not always projectiles, so that might not work in all instances, and, even still, it won't work perfectly.

If it's a full game, then you can probably just raise a variable as a flag or something and be done with it.

Uno

Re: Making the AI ignore Projectiles.
#6  April 24, 2013, 07:25:14 am
  • ***
  • kuruchutchut
    • Philippines
    • www.facebook.com/ronel.alinea
Code:
[State -3, nothitby]
type = NotHitBy
trigger1 = 1
value = , AP

will this work?
Re: Making the AI ignore Projectiles.
#7  April 24, 2013, 09:06:01 am
  • avatar
  • ******
    • Thailand
No, that won't work. He wants his character's AI to stop reacting to projectiles, he doesn't want his character to be invincible to projectiles.