Hello everyone.
What i'm trying to make is to create a slime that, when hit by certain attacks, he will divide in two copies of itself, but with half of their current HP. The condition to cause the dividing is the easy part, i can use Yanfly's BuffStatesCore plugin for that. The hard part is the effective dividing.
Tinkering with the engine, my first idea was to apply a code like this:
Basically i would force into the array the presence of a new enemy in the battle, and then setup the encounter to make the game re-read the member array. I immediately found myself in front of a problem, though, since this process won't generate a battle sprite for the new enemy, making it 1) invisible, and 2) cause to crash the game if targeted.
Is there a way to add a new, complete enemy in the Troop via script?
What i'm trying to make is to create a slime that, when hit by certain attacks, he will divide in two copies of itself, but with half of their current HP. The condition to cause the dividing is the easy part, i can use Yanfly's BuffStatesCore plugin for that. The hard part is the effective dividing.
Tinkering with the engine, my first idea was to apply a code like this:
var a = {enemyId: 2, x: 200, y: 200, hidden: false};
$gameTroop.troop().members.push(a);
$gameTroop.setup(2);
$gameTroop.refreshMembers();
Basically i would force into the array the presence of a new enemy in the battle, and then setup the encounter to make the game re-read the member array. I immediately found myself in front of a problem, though, since this process won't generate a battle sprite for the new enemy, making it 1) invisible, and 2) cause to crash the game if targeted.
Is there a way to add a new, complete enemy in the Troop via script?