This PR adds the encounter function CreateEnemy(script,x,y), which lets you create an enemy while the encounter is running. This function returns the ScriptWrapper object, which is not added to the default enemies table.
It also adds the Remove() function from enemy scripts which removes the enemy from the battle. Note that this does not actually remove the script reference; it solely removes the GameObject (and removes it from the internal enemies list.) It will throw an error if you try to destroy an enemy which is already destroyed.
Finally, this PR shortens an outdated error when the enemies table does not exist, to be more clear and concise.
This PR adds the encounter function
CreateEnemy(script,x,y)
, which lets you create an enemy while the encounter is running. This function returns the ScriptWrapper object, which is not added to the default enemies table.It also adds the
Remove()
function from enemy scripts which removes the enemy from the battle. Note that this does not actually remove the script reference; it solely removes the GameObject (and removes it from the internal enemies list.) It will throw an error if you try to destroy an enemy which is already destroyed.Finally, this PR shortens an outdated error when the
enemies
table does not exist, to be more clear and concise.