YesNoOk
avatar

How to make char AI execute hyper whenever power requirement is met? (Read 2418 times)

Started by Redben, December 14, 2019, 06:49:03 pm
Share this topic:
How to make char AI execute hyper whenever power requirement is met?
#1  December 14, 2019, 06:49:03 pm
  • avatar
  • **
    • Morocco
Hello,
What can I do in order to make a character's AI execute a hyper whenever is possible? Say the hyper requires two power bars to be done; I want the character's AI to execute it everytime immediately after the two bars are full. Thanks in advance.
Last Edit: December 14, 2019, 08:36:09 pm by Redben
Re: How to make char execute hyper whenever power requirement is met?
#2  December 14, 2019, 08:24:19 pm
  • ***
  • Magna Power
  • Its Hotdog time. Hot.... Dog...time...
    • neofiresonicmugen.webs.com
put a changestate like this in  your characters statedef -3

[state -3]
type = changestate
trigger1 = power = 2000
value = 200
ctrl = 0

this website is stupid
Re: How to make char execute hyper whenever power requirement is met?
#3  December 15, 2019, 01:10:32 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
put a changestate like this in  your characters statedef -3

[state -3]
type = changestate
trigger1 = AILevel
trigger1 = power >= XXX put the power level requirement
value = XXX state of the hyper

ctrl = 1 needs control otherwise it will interrupt other moves

Corrected, otherwise the human controlled characters will also perform automatically the move.
And it's better to code the AI routines in the CMD file, by the way
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: How to make char AI execute hyper whenever power requirement is met?
#4  December 15, 2019, 07:47:46 pm
  • avatar
  • **
    • Morocco
put a changestate like this in  your characters statedef -3

[state -3]
type = changestate
trigger1 = power = 2000
value = 200
ctrl = 0



It's working, although there is one problem:
When I start the round and click space (to make the power bars full for both chars), the character executes the move before the round' start lol (before the announcer says "FIGHT!"). Any idea on how to avoid this? Thanks again.
Re: How to make char AI execute hyper whenever power requirement is met?
#5  December 15, 2019, 07:50:48 pm
  • avatar
  • **
    • Morocco
put a changestate like this in  your characters statedef -3

[state -3]
type = changestate
trigger1 = AILevel
trigger1 = power >= XXX put the power level requirement
value = XXX state of the hyper

ctrl = 1 needs control otherwise it will interrupt other moves

Corrected, otherwise the human controlled characters will also perform automatically the move.
And it's better to code the AI routines in the CMD file, by the way


Firstly, thanks for the contribution.
Could you please give me an example of "AILevel?" Because I don't know what does that concern.
And -- I hope I'm not asking too much --  why do you think the cmd is better than cns for AI routines?
Last Edit: December 15, 2019, 09:46:59 pm by Redben
Re: How to make char AI execute hyper whenever power requirement is met?
#6  December 16, 2019, 10:10:41 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Ailevel is a 1.0+ trigger. If the character is ai controllex by mugen itll return a value between 1 and 9 so you can set difficulty. If its 0 the character is human controlled.

Ai living in the cmd is mostly convention. It used to be in state -2 for a while. But it makes more sense putting it in a location where the rest of the stuff is. Also gives you the ability to AI helpers with keyctrl = 1.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How to make char AI execute hyper whenever power requirement is met?
#7  December 18, 2019, 02:30:21 pm
  • avatar
  • **
    • Morocco
Ailevel is a 1.0+ trigger. If the character is ai controllex by mugen itll return a value between 1 and 9 so you can set difficulty. If its 0 the character is human controlled.

Ai living in the cmd is mostly convention. It used to be in state -2 for a while. But it makes more sense putting it in a location where the rest of the stuff is. Also gives you the ability to AI helpers with keyctrl = 1.

Much appreciated, thanks.
Re: How to make char AI execute hyper whenever power requirement is met?
#8  December 18, 2019, 02:32:43 pm
  • avatar
  • **
    • Morocco
put a changestate like this in  your characters statedef -3

[state -3]
type = changestate
trigger1 = AILevel
trigger1 = power >= XXX put the power level requirement
value = XXX state of the hyper

ctrl = 1 needs control otherwise it will interrupt other moves

Corrected, otherwise the human controlled characters will also perform automatically the move.
And it's better to code the AI routines in the CMD file, by the way

I have modified it into what you've presented, but it still sometimes interrupt not only the char's own moves, but the opponents moves as well even when the char under discussion is in a gethit scenario.
Re: How to make char AI execute hyper whenever power requirement is met?
#9  December 18, 2019, 08:04:04 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
then add something like triggerall=movetype!=H
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: How to make char AI execute hyper whenever power requirement is met?
#10  December 20, 2019, 04:58:36 pm
  • avatar
  • **
    • Morocco