YesNoOk

Show content

This section allows you to browse the content for this member. Note that you can only see content for which you have sufficient viewing permissions.

***
Jadeeye is Offline
Contact Jadeeye:

Jadeeye

Contributor

Messages by Jadeeye

    

Re: How to make AI trigger when the opponent attack them from behind

 August 20, 2022, 03:51:09 am View in topic context
 Posted by Jadeeye  in How to make AI trigger when the opponent attack them from behind (Started by Jadeeye August 19, 2022, 09:07:36 am
 Board: M.U.G.E.N Development Help

Working un Yun&Yang I kinda had trouble with stuff similar to this.
This might help a tiny bit https://mugenguild.com/forum/msg.2177655
https://mugenguild.com/forum/topics/facing-triggers-169645.0.html Facing can be confusing too.

But I think a major issue could be
enemy,
You might want to find a way to make that a bit more solid. Use DisplayToClipboard and make sure it's always the value you want. It might be tough to make happen. But I have a feeling it's changing on you and you dont want it to.

Also
enemy(1), facing = facing
Should be when the 2 chars are facing the same direction. Aka one is behind the other. But the idea is correct.

(enemy, backedgebodydist >= 0)  this is basically a true or false.
(backedgebodydist > enemy, backedgebodydist )
Should be closer to what you want.
It works like a charm, that's exactly what I need. Thank you.

Code:
[State -1, Jump]
type = ChangeState
value = 40
triggerall = AILevel && numenemy && roundstate = 2 && movetype != H
triggerall = (enemy, name = "Cyclop") && (enemy, stateno = 1000)
triggerall = ctrl
;Both chars are facing each other
trigger1 = (facing = 1 && (enemy, facing = -1)) || (facing = -1 && (enemy, facing = 1))
;Both chars are facing the same direction but the opponent must stand behind the main char
trigger2 = facing = 1 && (enemy, facing = 1) && backedgebodydist > (enemy, backedgebodydist >= 0)
trigger3 = facing = -1 && (enemy, facing = -1) && backedgebodydist > (enemy, backedgebodydist >= 0)

Firstly, you should have a triggerall=statetype!=A unless you don't have control in the air.  Also if you set ctrl, then you don't need movetype!=H.

Secondly, it is as Odb718 says. (enemy,backedgebodydist>=0) is a boolean and in this case is =1.  It's no different than saying backedgebodydist >1 when the enemy exists.  These triggers will always return true so your character will always jump regardless of whether they are in front or behind cyclop.

Thirdly, using enemy as a trigger redirect will only trigger if the first enemy is cyclop. If he becomes the second enemy, then the whole code won't trigger and if the enemy team consists of 2 cyclops then the code will only work against the first one, not the second.

If you're using enemy(0) and enemy(1), then you'd have to use teammode=simul as well else you're gonna get debug floods against single enemies.  This means it'd be easier if you have two separate jump changestates, one for vs single enemy and the other for vs simultaneous enemy.
Using these 2 redirects will also result in the code being more complicated.
As an example, the code for only when 'facing right' becomes:

Code:
trigger1 = facing=1 && ((enemy(0),name="cylcop" && enemy(0),facing=-1 && enemy(0),stateno=1000) || (enemy(1),name="cyclop" && enemy(1),facing=-1 && enemy(1),stateno=1000))
trigger2 = facing=1 && (enemy(0),name="cyclop" && enemy(0),facing=1 && enemy(0),stateno=1000 && ((enemy(0),backedgedist)<backedgedist))
trigger3 = facing=1 && (enemy(1),name="cyclop" && enemy(1),facing=1 && enemy(1),stateno=1000 && ((enemy(1),backedgedist)<backedgedist))

You should also factor in the fact that jumps are hardcoded into the AI so they will randomly jump unless you code them not to in state 40 or the negative states.  If you don't it will lead to false positives from time to time even if your whole code is correct.

Thank you for your clear explanation.

1/ Yea, I forgot the statetype != A :P

3/ Actually, I coded for second enemy too. I also made my own jumping with neutral jump only. My codes above is just an example.

The codes below should work for two opponents in Simul Mode. By using facing, frontedgebodydist and backedgebodydist, the AI only trigger when face to face the opponent (trigger1, trigger2) or the opponent stand behind them (trigger3, trigger4).
Code:
[State -1, Jump]
type = ChangeState
value = 40
triggerall = AILevel && numenemy && roundstate = 2 && statetype != A
triggerall = (enemy, name = "Cyclop") && (enemy, stateno = 1000)
triggerall = ctrl
trigger1 = facing = 1 && (enemy, facing = -1) && (frontedgebodydist > enemy, backedgebodydist)
trigger2 = facing = -1 && (enemy, facing = 1) && (frontedgebodydist > enemy, backedgebodydist)
trigger3 = facing = 1 && (enemy, facing = 1) && (backedgebodydist > enemy, backedgebodydist)
trigger4 = facing = -1 && (enemy, facing = -1) && (backedgebodydist > enemy, backedgebodydist)

[State -1, Jump]
type = ChangeState
value = 40
triggerall = AILevel && numenemy && roundstate = 2 && statetype != A
triggerall = (enemy(numenemy = 2), name = "Cyclop") && (enemy(numenemy = 2), stateno = 1000)
triggerall = ctrl
trigger1 = facing = 1 && (enemy(numenemy = 2), facing = -1) && (frontedgebodydist > enemy(numenemy = 2), backedgebodydist)
trigger2 = facing = -1 && (enemy(numenemy = 2), facing = 1) && (frontedgebodydist > enemy(numenemy = 2), backedgebodydist)
trigger3 = facing = 1 && (enemy(numenemy = 2), facing = 1) && (backedgebodydist > enemy(numenemy = 2), backedgebodydist)
trigger4 = facing = -1 && (enemy(numenemy = 2), facing = -1) && (backedgebodydist > enemy(numenemy = 2), backedgebodydist)

------------------------------------------------------------------------------------------------------

Once again, thank guys so much. I learned many things from this topic. Happy coding :lugoi:
    

Re: How to make AI trigger when the opponent attack them from behind

 August 19, 2022, 04:28:04 pm View in topic context
 Posted by Jadeeye  in How to make AI trigger when the opponent attack them from behind (Started by Jadeeye August 19, 2022, 09:07:36 am
 Board: M.U.G.E.N Development Help

Simul mode is hard to code.
But I think you would need to calculate the distance instead of using facing = -1
Could you let me know how to calculate it?

I think the key of the problem here is the distance from the back of AI and opponent to the edge of the screen but I don't know how to code a comparison between them to make the AI trigger.
    

Re: How to make AI trigger when the opponent attack them from behind

 August 19, 2022, 04:00:44 pm View in topic context
 Posted by Jadeeye  in How to make AI trigger when the opponent attack them from behind (Started by Jadeeye August 19, 2022, 09:07:36 am
 Board: M.U.G.E.N Development Help

AS far as I am concerned, when an opponent is behind you, p2bodydist X starts giving negative numbers. I would try testing that, like
p2bdoydist x < -20 or less.
But do not take -10 or -5 as values, p2bodydist x can give those when both of you are standing close to each other.
Hello how are you? try using:
enemy(0), facing != facing
enemy(1), facing != facing

enemy(0) is Player 2 and enemy(1) is Player 4.

We hope to have helped.

Thank guys, both method didn't work as intend. As your codes, the AI will trigger when face to face the opponent but it won't trigger when standing in front or behind the opponent (AI and their opponent are facing the same direction).

I used this code to let AI know the opponent stand behind them.

Code:
trigger2 = facing = 1 && (enemy, facing = 1) && backedgebodydist > (enemy, backedgebodydist >= 0) 
trigger3 = facing = -1 && (enemy, facing = -1) && backedgebodydist > (enemy, backedgebodydist >= 0)

It means that in the same direction, the distance from the AI's back to the edge of the screen is greater than the distance from the opponent's back to the edge of the screen. This shows that the opponent is standing behind the AI. But it didn't work.
    

How to make AI trigger when the opponent attack them from behind

 August 19, 2022, 09:07:36 am View in topic context
 Posted by Jadeeye  in How to make AI trigger when the opponent attack them from behind (Started by Jadeeye August 19, 2022, 09:07:36 am
 Board: M.U.G.E.N Development Help

Hi guys,

I want to make AI jump when some opponent shoot them in Simul Mode (2vs2). The code works but the AI also jump even they stand behind an opponent. Here's my code.

Code:
[State -1, Jump]
type = ChangeState
value = 40
triggerall = AILevel && numenemy && roundstate = 2 && movetype != H
triggerall = (enemy, name = "Cyclop") && (enemy, stateno = 1000)
triggerall = ctrl
;Both chars are facing each other
trigger1 = (facing = 1 && (enemy, facing = -1)) || (facing = -1 && (enemy, facing = 1))
;Both chars are facing the same direction but the opponent must stand behind the main char
trigger2 = facing = 1 && (enemy, facing = 1) && backedgebodydist > (enemy, backedgebodydist >= 0)
trigger3 = facing = -1 && (enemy, facing = -1) && backedgebodydist > (enemy, backedgebodydist >= 0)

I just want the AI jump when face to face the opponent or the opponent stand behind them, not they stand behind the opponent.
    

Re: Sennou-Room's WIP

 December 11, 2018, 03:43:30 am View in topic context
 Posted by Jadeeye  in Sennou-Room's WIP (Started by Sennou-Room April 08, 2017, 05:00:56 am
 Board: Projects

Currently in progress
 - ???
Spoiler, click to toggle visibilty
Glad to see someone work on AH's character.
    

Re: MUGEN Video thread

 September 26, 2018, 04:53:32 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - Nakoruru (CvS3/POTS style) by Phantom.of.the.Server edited by HyperClawManiac

    

Re: MUGEN Video thread

 September 10, 2018, 05:38:28 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - T. Hawk (CvS3/POTS style) by Varo Hades & BahamianKing100

    

Re: MUGEN Video thread

 August 27, 2018, 06:09:23 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - CVS Neo Chun-Li (POTS/Infinite style) by Falcon Rapper

    

Re: MUGEN Video thread

 August 08, 2018, 04:52:17 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - Rainbow Mika (CvS3/POTS style) by DeathScythe

    

Re: MUGEN Video thread

 July 22, 2018, 06:38:00 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - Mai-Ling (CvS3/POTS style) by k6666orochi

    

Re: Mai ling Pots style released

 July 22, 2018, 05:00:23 pm View in topic context
 Posted by Jadeeye  in Red Earth (Warzard) Chars in Pots style: Kenji released 12/25/2018 (Started by k6666orochi December 10, 2017, 03:09:06 pm
 Board: Your Releases, 1.0+

I have made the video for this little martial girl.



I also have some feedback:
- The animation of grabbed opponent is wierd.
- Cho Kuujin-Ken's projectile have no guard sound.
- Cho Enryuu Kyaku has a very short superpause time (performing before the supperpause effect end).
- Lv3 Super doesn't have portrait. It also can not be used to combo (superpause isn't long enough, I think).

Very interested in to see you work on Red Earth's chars.

    

Re: MUGEN Video thread

 July 15, 2018, 05:26:06 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - Donovan Baine (CvS3/POTS style) by Zelgadis296 edited by ShinRei & Gui Santos

    

Re: MUGEN Video thread

 July 03, 2018, 04:54:29 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

KoF MUGEN Battle #8 - Terry vs Iori

Terry tackles constantly and launches his wave at close range to put pressure on opponents. Iori uses his projectile to keep distance from the opponent and attack the opponent suddenly with his claw.

    

Re: MUGEN Video thread

 June 18, 2018, 04:54:48 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

KoF MUGEN Battle #7 - Robert vs Kim

Both Robert and Kim use martial arts kicks. Robert attack by performing dive kick from the air that combine with land straight kick and launching his projectile to pressure his opponent. Kim defend with his rising somersault kick and wait for opportunity to do multiple chain kicks on the opponent.

    

Re: MUGEN Video thread

 June 05, 2018, 05:05:21 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

MUGEN Competition #73 - Psylocke vs Benimaru

Benimaru defends well with his electric fist, which create large area electric ball. Psylocke approach Benimaru difficulty, she have to force her opponent move with her projectile and use her sword to stab the opponent unexpected, as well as the chance to perform air combos.

    

Re: MUGEN Video thread

 May 20, 2018, 04:51:15 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

MUGEN Competition #72 - Team Battle: Takuma & Ryo vs Hiryu & Psylocke

Ninja team have the advantage of possessing weapons to overwhelm and the ability to teleport that distracting the opponents. Sakazaki team try to defend with Ki and their techniques. Ninja team constantly launch their projectile, the Sakazaki have to approach the opponent from the air.

    

Re: MUGEN Video thread

 May 12, 2018, 04:48:57 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

MUGEN Competition #71 - Team Battle: Chin & Athena vs Ryu & Rose

Chin and Ryu deal damage on the opponents with their projectiles while Athena and Rose defend themselves with their spiritual energy and use teleportation to surround the opponents. Chin and Athena tries to defend against Ryu and Rose's attacks.

    

Re: MUGEN Video thread

 May 08, 2018, 05:04:52 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

MUGEN Competition #70 - Ryu vs Gen

Gen attack low position causing Ryu difficult to use Hadouken, but Gen also has difficulty to approach Ryu. They both defend against airborne attacks. Ryu and Gen have to rely on their Hyper to inflict massive damage on the opponent.

    

Re: MUGEN Video thread

 May 05, 2018, 04:49:30 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

KoF MUGEN Battle #6 - Team Battle: Saisyu & Kyo vs Takuma & Ryo

The fight between the Kusanagi and the Sakazaki. Ryuko Ranbu is the main weapon of the Sakazaki that cause multiple hits on the opponents while Kusanagi fight back by using their flaming attacks.

    

Re: MUGEN Video thread

 May 01, 2018, 06:29:59 pm View in topic context
 Posted by Jadeeye  in MUGEN Video thread (Started by c001357 September 27, 2008, 11:24:14 am
 Board: M.U.G.E.N Discussion

Char Released - Rugal & God Rugal (CvS3/POTS style) by Varo Hades & BahamianKing100