Hey guys, after making my own AI with some monsters, I've encountered a pretty strange bug and hoped someone could explain whats going on and if there is some way to fix it.
When I changed the AI of Bite Bug, Caterchipillar got invisible during the fights hes included in the same group (its still present, doing attacks the way I wrote on its AI, but only the shadow showing up), like the one theres 1x Caterchipillar and 2x Bite Bugs in Balamb forest (near Fire Cavern). If I change the Caterchipillar AI nothing wrong happens, but changing Bite Bug's does happen.
Whats going on?
This is the code I wrote on Bite Bug's AI:
if (self.status == CONFUSION) {
target(207)
domoveid(0)
return
}
if (self.varDC < 5) {
self.varDC += 1
}
if (self.status == AURA) {
self.varDC += 1
return
}
if (self.varDC <= 2) {
target(201)
domoveid(0)
return
}
if (self.varDC >= 5) {
if (rand() % 1 == 0) {
self.varDC = 0
target(201)
domoveid(2)
return
}
}
if (rand() % 1 == 0) {
target(201)
domoveid(1)
return
}
else {
target(201)
domoveid(0)
return
}
And this is Caterchipillar's:
if (self.status == CONFUSION) {
target(207)
domoveid(0)
return
}
if (self.status == AURA) {
self.varDC += 1
}
if (self.varDC < 5) {
self.varDC += 1
}
if (self.hp < 4) {
if (rand() % 1 == 0) {
target(200)
domoveid(4)
return
}
}
if (self.varDC < 4) {
if (rand() % 1 == 0) {
self.varDC += 1
target(201)
domoveid(0)
}
else {
target(201)
domoveid(1)
}
return
}
if (self.varDC >= 4) {
if (rand() % 1 == 0) {
target(201)
domoveid(2)
}
else {
target(204)
domoveid(3)
}
if (rand() % 1 == 0) {
self.varDC = 0
}
else {
self.varDC = 1
}
return
}
self.varDC += 1
target(201)
domoveid(0)