YesNoOk
avatar

A.I. question (Read 1041 times)

Started by M206, January 17, 2017, 08:08:36 am
Share this topic:
A.I. question
#1  January 17, 2017, 08:08:36 am
  • ***
Hi everyone,

i've read the A.I. tutorial, but i still have a doubt.

i want a certain move only to be performed after another one by the A.I.

I mean, for my sagat, i've a standard high punch that is a move, and i have a combo version of it that's another move.

I want the combo version of my high punch to appear only after my light punch, and not alone or when the mugen wants.

[State -1, Stand Strong Punch] ; adon strong punch
type = ChangeState
value = 1605
triggerall = var(59) = 1
triggerall = roundstate != 1 && roundState = 2 && alive && random < 2000 && statetype != A
triggerall = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
TRIGGER1 = CTRL || (StateNo = 1604 && Animelem =3, >= 1) && movecontact

i tought that in this way it should be performed only after the stateno 1604 (light punch), instead i see that it appear often alone..

any hints?

thanks in advance.
Re: A.I. question
#2  January 17, 2017, 11:15:21 am
  • **
    • France
    • https://misterr07world.go.zd.fr/
I suggest you to delete : "CTRL ||"  and this movement will be performed only after stateno 1604 in AI mode
(I suppose this char is not for mugen 1.0, otherwise you should use the trigger "ailevel"rather than var(59)...)
Re: A.I. question
#3  January 17, 2017, 03:38:21 pm
  • ***
I suggest you to delete : "CTRL ||"  and this movement will be performed only after stateno 1604 in AI mode
(I suppose this char is not for mugen 1.0, otherwise you should use the trigger "ailevel"rather than var(59)...)

thanks for your reply, i've already tried without CTRL ||, the situation got better, but sometimes it works even standalone.. :( :(
Re: A.I. question
#4  January 18, 2017, 11:00:46 am
  • **
    • France
    • https://misterr07world.go.zd.fr/
no other state -1 that sends the char in stateno 1605 ? maybe ?
Re: A.I. question
#5  January 18, 2017, 05:28:06 pm
  • avatar
  • *
    • USA
[State -1, Stand Strong Punch] ; adon strong punch
type = ChangeState
value = 1605
triggerall = var(59) = 1
triggerall = roundstate != 1 && roundState = 2 && alive && random < 2000 && statetype != A
triggerall = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
TRIGGER1 = CTRL || (StateNo = 1604 && Animelem =3, >= 1) && movecontact
Try something like this instead:
Code:
[State -1, Stand Strong Punch] ; AI combo-only version
type = ChangeState
value = 1605
triggerall = var(59) = 1
triggerall = roundstate = 2 && alive && StateNo = 1604
triggerall = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
triggerall = random < 2000 ;Random only goes from 0-999... is this a typo?
trigger1 = ctrl
trigger2 = (animelem = 3, >= 1) && movecontact
Re: A.I. question
#6  January 19, 2017, 04:43:01 am
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
Ensure that in your command section you have all your commands with a !var(ai var here) to offset it from the AI...
Code:
    [State -1, Stand Strong Punch] ; character controlled
    type = ChangeState
    trigger1 = !var(59)
    trigger1 = StateNo = 1604
    trigger1 = (animelem = 3, >= 1) && movecontact
    value = 1605
...as well as removing ctrl from your AI command. You're all trying too hard.
Code:
    [State -1, Stand Strong Punch] ; AI combo-only version
    type = ChangeState
    trigger1 = var(59) = 1
    trigger1 = StateNo = 1604
    trigger1 = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
    trigger1 = (animelem = 3, >= 1) && movecontact
    value = 1605
This is all it should take. Having a random<2000 will never affect it as the chances of that happening, assuming it even went up to 2000, would be near impossible. A random<200 would be more acceptable.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."
Re: A.I. question
#7  January 19, 2017, 05:17:36 pm
  • ***
[State -1, Stand Strong Punch] ; adon strong punch
type = ChangeState
value = 1605
triggerall = var(59) = 1
triggerall = roundstate != 1 && roundState = 2 && alive && random < 2000 && statetype != A
triggerall = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
TRIGGER1 = CTRL || (StateNo = 1604 && Animelem =3, >= 1) && movecontact
Try something like this instead:
Code:
[State -1, Stand Strong Punch] ; AI combo-only version
type = ChangeState
value = 1605
triggerall = var(59) = 1
triggerall = roundstate = 2 && alive && StateNo = 1604
triggerall = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
triggerall = random < 2000 ;Random only goes from 0-999... is this a typo?
trigger1 = ctrl
trigger2 = (animelem = 3, >= 1) && movecontact

thanks!! now it seems to work very well!! :) :)

Ensure that in your command section you have all your commands with a !var(ai var here) to offset it from the AI...
Code:
    [State -1, Stand Strong Punch] ; character controlled
    type = ChangeState
    trigger1 = !var(59)
    trigger1 = StateNo = 1604
    trigger1 = (animelem = 3, >= 1) && movecontact
    value = 1605
...as well as removing ctrl from your AI command. You're all trying too hard.
Code:
    [State -1, Stand Strong Punch] ; AI combo-only version
    type = ChangeState
    trigger1 = var(59) = 1
    trigger1 = StateNo = 1604
    trigger1 = p2statetype = S && p2dist x <= 120 && p2dist x >= 60
    trigger1 = (animelem = 3, >= 1) && movecontact
    value = 1605
This is all it should take. Having a random<2000 will never affect it as the chances of that happening, assuming it even went up to 2000, would be near impossible. A random<200 would be more acceptable.

ok many thanks for your info, yes, in the character controlled part i've the line var(59)=0. ;) ;)