collapse

Author Topic: Strange issue with the AI....  (Read 457 times)

0 Members and 1 Guest are viewing this topic.

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Strange issue with the AI....
« on: April 24, 2008, 01:30:45 PM »
I have been working with the AI of my char... everything is working exactly as I wanted except for a teleport move that I made....the AI makes all the anim but 80% of the times he doesn't teleport(I'm using a posadd)..... playing with the char that issue never happens the move can only be made if you aren't making another attack (you have to have ctrl of the char), when you are on the state you don't have control of the char, so you cannot change to another state....I even have tried coding the posadd on the statedef -2....it worked well for the char but the Ai still have that issue.....here its the code of the AI...I hope someone can help me

[State AI, teleport]
type = ChangeState
triggerall = var(0)
triggerall = statetype = S ; move can only be made on Stand position
triggerall = statetype != C
triggerall = statetype !=A
triggerall = p2movetype = A; when the opponent attack
triggerall = enemy,NumProj >= 1 || enemy,NumHelper >=1
triggerall = stateno !=1230 ; avoid changing to the same state
triggerall = prevstateno !=1230
triggerall = ctrl =1 ; can only be activated when the char can be controlled
trigger1 = p2movetype = A
trigger1 = stateno !=1230
trigger1 = random =[0,20]
trigger2 = enemy,NumProj >= 1 || enemy,NumHelper >=1
trigger2 = random =[0,30]
value = 1230


Thnx in advance...if the code of my state is needed, I will post it :thumbsup:




sig made by shullbocka

Offline Kong

  • IMT Content Architect
  • *
  • Posts: 453
  • Last Login:July 01, 2016, 03:41:01 AM
    • Mugen
    • Email
Re: Strange issue with the AI....
« Reply #1 on: April 24, 2008, 01:53:37 PM »
[State AI, teleport]
type = ChangeState
triggerall = var(0)
triggerall = statetype = S ; move can only be made on Stand position
triggerall = p2movetype = A; when the opponent attack
;triggerall = enemy,NumProj >= 1 || enemy,NumHelper >=1
triggerall = stateno !=1230 ; avoid changing to the same state
triggerall = prevstateno !=1230
triggerall = ctrl =1 ; can only be activated when the char can be controlled
trigger1 = random < 200
trigger2 = enemy,NumProj >= 1 || enemy,NumHelper >=1
trigger2 = random < 200
value = 1230

;--------------

you can increase the random value

random < 30 is about 3% chance.



Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Strange issue with the AI....
« Reply #2 on: April 24, 2008, 02:22:54 PM »
Thnx for your help...but that ddin't fixed the problem wich is that the AI skips the posadd and just does the animations

About the randoms, in these case I prefer a low percentage to avoid being a cheap teleport that avoids a lot of the attacks


sig made by shullbocka

Offline Kong

  • IMT Content Architect
  • *
  • Posts: 453
  • Last Login:July 01, 2016, 03:41:01 AM
    • Mugen
    • Email
Re: Strange issue with the AI....
« Reply #3 on: April 24, 2008, 02:58:13 PM »
that is in the cns code, post the related state .

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Strange issue with the AI....
« Reply #4 on: April 24, 2008, 03:39:35 PM »
Maybe as you said could be the cns...but I just don't get why when I use the char works fine and the AI skips the posadd


Code: [Select]
[Statedef 1230]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 120
ctrl = 0
anim = 1230; start the teleport
sprpriority = 2

[State 1231, 1]; the teleport
type = PosAdd
trigger1 = time =19
x = 295

[State 0, CtrlSet]; I added these because I thought the ctrl was the problem
type = CtrlSet
trigger1 =  1
value = 0


[State 0, StateTypeSet]; the char makes a little jump so these avoid issues if he gets hit
type = StateTypeSet
trigger1 = animelem >=2
statetype = A
movetype = A
physics = N

[State 1230, NotHitBy]
type = NotHitBy
trigger1 =time = 1
value = SCA,NA
time = 40

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim = 1230 &&  time = 16
value = 180; empty anim

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim = 180 && time = 18
value = 1232; finishing the teleport anim

[State 1231, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1


when the changeanim is activated the anim still has like 2 or 3 ticks left



sig made by shullbocka

Offline Kong

  • IMT Content Architect
  • *
  • Posts: 453
  • Last Login:July 01, 2016, 03:41:01 AM
    • Mugen
    • Email
Re: Strange issue with the AI....
« Reply #5 on: April 25, 2008, 03:01:25 AM »
check other cmd state for cltr != 1  in the cmd file, may be the ai change to other state

before the posadd.

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Strange issue with the AI....
« Reply #6 on: April 25, 2008, 08:08:14 AM »
Thnx Kong... I have fixed the issue....I had to add a stateno !=1230 in each state of the AI, and it works perfect now....the Ai was changing to another state


sig made by shullbocka

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by ExShadow
[November 02, 2024, 04:54:41 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]


Rooftop Skyline(1.1 Only/AIGS) by Vegaz by LightFlare
[October 21, 2024, 12:13:37 PM]


Secluded Base(1.1 Only/AIGS) by Vegaz by LightFlare
[October 17, 2024, 01:21:06 PM]


Ultimate Balrog + stage by ELECTRO
[October 17, 2024, 05:40:31 AM]


Classic VS : Balrog by ELECTRO
[October 08, 2024, 04:35:53 PM]

* IMT Calendar

November 2024
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 [13] 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal