YesNoOk
avatar

AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE (Read 4663 times)

Started by Shin DANZEY, July 09, 2017, 11:14:27 pm
Share this topic:
AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
#1  July 09, 2017, 11:14:27 pm
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
HELLO , I would like a code to remenber if a opponent can throw a projectile in order to adapt the ai moving or else.
I am not comfortable with variables . Could you tell me your opinion?


[State -2, Remember Enemy just throw a projectile]
type = varset
triggerall = roundstate= 2
trigger1 = Enemynear,hitdefattr=SCA,np,sp,hp,ap
trigger2 = P2MoveType =a && P2StateNo >= 160
trigger2 = Enemy,vel x = 0 && !(Enemynear,Ctrl) && enemy,numproj
trigger3 =enemy,numhelper>0 && enemy,vel x=0 && p2movetype=A
trigger3= p2dist x>80
trigger4 = enemy,projcontact=1
var(44) = 1

[State -2,  to indicate the opponnent can throw a projectile]
type = varadd <<<< VARADD to keep the var(44) >0
triggerall= var(44)>0
trigger1 = roundno>0 || roundstate=2 || 1<<<<< activate always
var(44)=2 <<<<<< i have the var(44) ALWAYS >0 so AI MUST BEWARE                                                 



AM I RIGHT?

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website
Last Edit: July 11, 2017, 10:02:58 am by SHIN DANZEY
Re: AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
#2  July 10, 2017, 01:57:36 am
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
ADD A CODE FOR MORE INFORMATION

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website
Re: AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
#3  July 10, 2017, 01:39:12 pm
  • ****
    • USA
    • twitter.com/inktrebuchet
Re: AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
#4  July 10, 2017, 05:09:13 pm
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
I don't think enemynear will work for helpers.

I was working on something similar a couple months ago. I ended up making a system for AI to detect a projectile helpers, it might be just what you're looking for.

http://mugenguild.com/forum/topics/ai-detect-enemys-helper-projectile-system-179829.new.html




OK it is a very good work to begin but i would like a code to save in my player data like "varset" the fact my opponent can throw a projectile. detect is not too hard with this:numhelper ,enemy,hitdefattr=SCA,np,sp,hp,enemy,numproj,..)
INDEED, i want after my opponent threw a projectile.A VARIABLE( or else) IS TRUE in order to prevent my character to do actions in particular.thanks for your answer

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website
Re: AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
#5  July 11, 2017, 09:52:52 am
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
I ALMOST SOLVED THE PROBLEM PLEASE GIVE YOUR OPINION

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website
Re: AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
New #6  July 11, 2017, 01:24:27 pm
  • ****
    • USA
    • twitter.com/inktrebuchet
Your code won't always detect if a projectile was thrown.

-Enemynear redirects to the nearest enemy not the nearest helper/projectile.
-Enemy,numhelper > 0 might seem like it's working for some characters but that will trigger for any helper, not just projectiles.

I recommend giving that system I linked a try. It's simple to add to any character, It will do exactly what you are wanting and your code would look something like this:
Code:
[State -2, Remember Enemy just throw a projectile]
type = varset
trigger1 = PlayerIDExist(helper(33333333),var(3))  ; enemy helper projectile detected.
trigger2 = numproj > 0 ; enemy projectile detect, non-helper type.
var(44) = 1
Last Edit: July 11, 2017, 09:32:36 pm by ink
Re: AI CODE REMENBER if A OPPONENT CAN TRHOW A PROJECTILE
#7  July 11, 2017, 07:39:58 pm
  • ***
  • The true fight begins now..get in the tournament!
  • Danzey legendary tournament is the final fight!
    • France
    • danzey-legendary-tournament.blogspot.fr/
Your code won't always detect if a projectile was thrown.

-Enemynear redirects to the nearest enemy not the nearest helper/projectile.
-Enemy,numhelper > 0 might seem like it's working for some characters but that will trigger for any helper, not just projectiles.

I recommend giving that system I linked a try. It's simple to add to any character, It will do exactly what you are wanting and your code would look something like this:
Code:
[State -2, Remember Enemy just throw a projectile]
type = varset
trigger1 = PlayerIDExist(helper(33333333),var(3))  ; enemy helper projectile detected.
trigger2 = numproj > 0
var(44) = 1

thanks ! I WILL TRY IT

my older name was danzey,now i'm SHIN DANZEY
FOLLOW ME ON YOUTUBE AND my Website