YesNoOk
avatar

make a char stronger (AI??) (Read 2629 times)

Started by reyspriter, April 12, 2008, 01:38:53 pm
Share this topic:
make a char stronger (AI??)
#1  April 12, 2008, 01:38:53 pm
  • **
how can i make my char stronger when i fight against him?? i have seen at anjels itachi that he had used many AI´s...

How i can make that??

BC

Re: make a char stronger (AI??)
#2  April 13, 2008, 12:24:40 pm
  • avatar
  • ****
    • UK
this is my method of AI and it works for me many people have different methods as well as this.

first of all go to commands and you can copy and paste this if you want its a list of impossible commands that only the cpu can do
[Command]
name = "cpu1"
command = U, D, F
time = 1

[Command]
name = "cpu2"
command = U, B, F
time = 1

[Command]
name = "cpu3"
command = U, D, D
time = 1

[Command]
name = "cpu4"
command = F, B, U
time = 1

[Command]
name = "cpu5"
command = U, F, U, B
time = 1

[Command]
name = "cpu6"
command = U, D, B
time = 1

[Command]
name = "cpu7"
command = F, F, B
time = 1

[Command]
name = "cpu8"
command = U, D, U
time = 1

[Command]
name = "cpu9"
command = F, B, B
time = 1

[Command]
name = "cpu10"
command = F, F, B, B
time = 1

[Command]
name = "cpu11"
command = U, U, F
time = 1

[Command]
name = "cpu12"
command = U, B, B
time = 1

[Command]
name = "cpu13"
command = U, B, F, F
time = 1

[Command]
name = "cpu14"
command = U, F, B, U
time = 1

[Command]
name = "cpu15"
command = U, B, F, U
time = 1

[Command]
name = "cpu16"
command = U, B, B, B
time = 1

[Command]
name = "cpu17"
command = U, D, B, F
time = 1

[Command]
name = "cpu18"
command = U, D, B, D
time = 1

[Command]
name = "cpu19"
command = U, D, F, U
time = 1

[Command]
name = "cpu20"
command = U, D, U, B
time = 1

[Command]
name = "cpu21"
command = U, D, F, F
time = 1

[Command]
name = "cpu22"
command = F, F, F, F
time = 1

[Command]
name = "cpu23"
command = U, U, U, D
time = 1

[Command]
name = "cpu24"
command = B, B, B
time = 1

[Command]
name = "cpu25"
command = D, D, D, D
time = 1

[Command]
name = "cpu26"
command = D, D, D
time = 1

[Command]
name = "cpu27"
command = F, F, F
time = 1

[Command]
name = "cpu28"
command = U, U, U
time = 1

[Command]
name = "cpu29"
command = U, U, B, B
time = 1

[Command]
name = "cpu30"
command = D, D, F, F
time = 1

Then what you need to do is make your AI trigger which requires setting a variable. If you copied and pasted the previous code then you can do the same for this..

[State -1, AI TRIGGER]
type = Varset
triggerall = RoundState = 2
trigger1 = command = "cpu1"
trigger2 = command = "cpu2"
trigger3 = command = "cpu3"
trigger4 = command = "cpu4"
trigger5 = command = "cpu5"
trigger6 = command = "cpu6"
trigger7 = command = "cpu7"
trigger8 = command = "cpu8"
trigger9 = command = "cpu9"
trigger10 = command = "cpu10"
trigger11 = command = "cpu11"
trigger12 = command = "cpu12"
trigger13 = command = "cpu13"
trigger14 = command = "cpu14"
trigger15 = command = "cpu15"
trigger16 = command = "cpu16"
trigger17 = command = "cpu17"
trigger18 = command = "cpu18"
trigger19 = command = "cpu19"
trigger20 = command = "cpu20"
trigger21 = command = "cpu21"
trigger22 = command = "cpu22"
trigger23 = command = "cpu23"
trigger24 = command = "cpu24"
trigger25 = command = "cpu25"
trigger26 = command = "cpu26"
trigger27 = command = "cpu27"
trigger28 = command = "cpu28"
trigger29 = command = "cpu29"
trigger30 = command = "cpu30"
v = 7
value = 1

ok now basically you can add triggers to your -1 states for the move or copy and past the move and add to it, ill show you an example

the first code is the move that doesnt have any AI to it

;plasma
[State -1, plasma]
type = ChangeState
value = 777
triggerall = command = "plasma"
triggerall = var(7) != 1
triggerall = stateno != 4000
trigger1 = (statetype = s) && ctrl
triggerall = statetype !=A
triggerall = p2dist X >=30

notice triggerall = var(7) !=1  this means that AI isnt activated on this move and triggers.

now what i did was copied and pasted the move and added a different trigger

[state -1, plasmaAI]
type = ChangeState
value = 777
triggerall = var(7)
triggerall = !Win
triggerall = StateType  != A
triggerall = P2BodyDist X >= 80
triggerall = StateType = S
trigger1 = ctrl
trigger1 = Random <= 30

triggerall = var(7) so now  AI is activated on this move.
trigger1 = random <= 30   this gives the AI i think a less than 30% chance of doing this move

i make sure that trigger1 = ctrl and i use the same trigger1 to use the random trigger becuase it doesnt loop the move.

anyway hope this helps as this is what works for me. :sugoi:
Accepting commissions
Re: make a char stronger (AI??)
#3  April 13, 2008, 05:51:13 pm
  • **
wow, thanx! i think it works!!

[state -1, Atk1]
type = ChangeState
value = 200
triggerall = var(7)
triggerall = !Win
triggerall = P2BodyDist X >= 80
triggerall = StateType = S
trigger1 = ctrl
trigger1 = Random <= 99

what happens when i make the last trigger to 99??

BC

Re: make a char stronger (AI??)
#4  April 13, 2008, 06:13:01 pm
  • avatar
  • ****
    • UK
yes it works but you wasnt supposed to copy all the triggers lol

like p2bodydist x >= 80, that was just for my specific character, i wanted him to do his projectile when p2 was greater than or equal to 80 on his X distance.

random <=99 means just a higher percentage chance of the AI doing the move....you need to add more moves to AI so it doesnt just do this move all the time.
Accepting commissions
Re: make a char stronger (AI??)
#5  April 15, 2008, 02:43:05 am
  • ***
o and in case your character has a lot of different commands in the .cmd i suggest replacing the names "cpu1," "cpu2," "cpu3," ect. with just "cpu" for all of them... because there is a command limit and some people do hit it lol