Hi !
I am making of a custom battle system using common events, but it has become really tedious in terms of conditional branches... I have used very basic scripting for some of the events in the system (like in the first image), but when designing enemy AI I think I have reached a wall...
I have tried to do it, for example, like this:
if ($gameVariables.value(382) == 1
{
if ($gameVariables.value(391) <= 8
{
if ($gameSwitches.value(25) == true && ($gameVariables.value(397) == 5
{ ... and so on
}
}
}
And of course it lead to syntax errors; but I have figured that even if I manage to make it that far and create nested conditional branches, I find it very difficult to edit later on (like in image 2 for example, is hard to search individual parts from the script even if I try to keep it ordered)... so I was wondering if there is a way to make a javascript file that you can activate in the script manager and later call from the script call in the events command (image 3)...
Thanks beforehand!
I am making of a custom battle system using common events, but it has become really tedious in terms of conditional branches... I have used very basic scripting for some of the events in the system (like in the first image), but when designing enemy AI I think I have reached a wall...
I have tried to do it, for example, like this:
if ($gameVariables.value(382) == 1
{
if ($gameVariables.value(391) <= 8
{
if ($gameSwitches.value(25) == true && ($gameVariables.value(397) == 5
{ ... and so on
}
}
}
And of course it lead to syntax errors; but I have figured that even if I manage to make it that far and create nested conditional branches, I find it very difficult to edit later on (like in image 2 for example, is hard to search individual parts from the script even if I try to keep it ordered)... so I was wondering if there is a way to make a javascript file that you can activate in the script manager and later call from the script call in the events command (image 3)...
Thanks beforehand!