YesNoOk
avatar

How to force char to apply a certain move only one time per round? (Read 1981 times)

Started by Redben, January 04, 2020, 01:41:28 pm
Share this topic:
How to force char to apply a certain move only one time per round?
#1  January 04, 2020, 01:41:28 pm
  • avatar
  • **
    • Morocco
Hello,
I was wondering if there is a way to force a character's AI to only execute a certain hyper move one time per round.
> wether it's forcing his AI or technically making it impossible to do the move twice is no different; both are equally good for me.
Thanks in advance.
Re: How to force char to apply a certain move only one time per round?
#2  January 04, 2020, 02:18:21 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
You will need to set up a variable that changes the value once the move has been performed and then prevents the move from being activated again
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 force char to apply a certain move only one time per round?
#3  January 05, 2020, 10:52:12 pm
  • *****
  • Shame on you!
    • USA
Or if you're low on Variables, you can spawn an invisible explod and check if the explod exists in the changestate in the cmd.
There are a few ways. You could do the explod trick with a helper also.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How to force char to apply a certain move only one time per round?
#4  January 06, 2020, 05:56:25 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Here's an example for your move in State -1

Type = ChangeState
triggerall = Var(10) = 0   ;Move will not trigger unless Var(10) is zero
trigger1 = things
trigger1 = things
trigger1 = var(10) := 1 ;Sets Var(10) to 1 when all the above trigger1 conditions are met.
trigger2 = things
trigger2 = things
trigger2 = var(10) := 1 ;Sets Var(10) to 1 when all the above trigger2 conditions are met.
state = 200

Use a Var that is not persistent between rounds.  This is defined in your characters definitions.  Plainly, use a low Var number, not 59, 60, etc.

Re: How to force char to apply a certain move only one time per round?
#5  January 08, 2020, 02:41:02 am
  • avatar
  • **
    • Morocco
Thank you all guys.