YesNoOk
avatar

AI spams dash and charges infinitely (Read 3766 times)

Started by WastedCoder, August 04, 2021, 03:41:12 pm
Share this topic:
AI spams dash and charges infinitely
#1  August 04, 2021, 03:41:12 pm
  • **
    • Ukraine
Hi, everyone. I have two problems with a char.
1. He spams dash back-forward-back-forward, doing it really fast he just flies into nowhere

Here's the code in the AI for it.

Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty


2. AI charges even if his power is 3000(max)

AI code

Spoiler, click to toggle visibilty

Spoiler, click to toggle visibilty

Code from .cns

Spoiler, click to toggle visibilty


var(2) is for transformation. He transforms when he is low hp, but charge problem is the same for both transformed and not.
I tried moving power charge in the AI file and .cmd file putting it higher or lower, same with dash, but it didn't work. :c
Lowering random < X didn't work as well.

Re: AI spams dash and charges infinitely
#2  August 06, 2021, 10:58:31 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
you need to add !ailevel or Ailevel=0 to every human controlled commands, otherwise the AI will access both the AI-only and the Human-only
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: AI spams dash and charges infinitely
#3  August 08, 2021, 03:11:11 pm
  • **
    • Ukraine
you need to add !ailevel or Ailevel=0 to every human controlled commands, otherwise the AI will access both the AI-only and the Human-only

I did it, but he still ignores the triggers.
Like, I put into power charge end trigger  'triggerall = p2bodydist x < 100' then I turn on AI and come just super close to him, and he still charges.
He ignores some other triggers the same way unless I put something like 'triggerall = random < 200' then randomness makes it work barely, but it's not the result I am looking for. Because when I put the same triggers into different chars they act EXACTLY as I've written.
Why do some chars ignore trigs I put in their AI?
Re: AI spams dash and charges infinitely
#4  August 08, 2021, 08:40:02 pm
  • ****
    • crepa.neocities.org
What about the changestates intended for the player? Post the code for those too.
Also, this is minor but I noticed you have skipped numbers in your triggers, like trigger1 > trigger2 > trigger4 (skipping trigger3). I don't remeber if this matters or not but... just saying. :P
Re: AI spams dash and charges infinitely
#5  August 09, 2021, 01:43:19 am
  • **
    • Ukraine
What about the changestates intended for the player? Post the code for those too.
Also, this is minor but I noticed you have skipped numbers in your triggers, like trigger1 > trigger2 > trigger4 (skipping trigger3). I don't remeber if this matters or not but... just saying. :P

It does matter. I fixed it, thanks. Can't believe I didn't notice that XD

I don't really understand what you mean, but ... maybe this is what you mean :D

Spoiler, click to toggle visibilty