- Joined
- Jun 12, 2016
- Messages
- 41
- Reaction score
- 10
- First Language
- Portuguese
- Primarily Uses
Years ago I was trying to make a bestiary, and someone gave a code to create a temporary enemy, so I can get all his attributes and stats for my bestiary.
I don't remember who helped me with that. I decided to use it again, and a problem is happening just like it did years ago (I did not try to fix it). So even though I'm on a new project, the error is still there (the same one).
This is the script call:
The variable 41 is the enemy ID that I want to create so I can show his info at the bestiary.
If I use an item called Bestiary, It calls a common event that I can choose which enemy to see his information. Then it sends me to the common event that has this above script call, so I can get the attributes of the enemy and send it to the bestiary text.
If I'm in combat, I just use a Scan skill that calls the same common event.
So this script call is used inside and outside battle.
- After doing some fights, an error can occur (image 1) when I enter combat.
- I will also show the console (image 2).
If I reload the save right before the battle, the error does not occur again. So my theory is that a tempEnemy that was created on a previous fight is responsable for making the error happen on the current fight that crashed the game.
I don't understand much about the subject...
I don't remember who helped me with that. I decided to use it again, and a problem is happening just like it did years ago (I did not try to fix it). So even though I'm on a new project, the error is still there (the same one).
This is the script call:
Code:
var id = $gameVariables.value(41);
if (!!$gameTemp._tempEnemy) $gameTemp._tempEnemy.transform(id);
else $gameTemp._tempEnemy = new Game_Enemy(id, 0, 0);
If I use an item called Bestiary, It calls a common event that I can choose which enemy to see his information. Then it sends me to the common event that has this above script call, so I can get the attributes of the enemy and send it to the bestiary text.
If I'm in combat, I just use a Scan skill that calls the same common event.
So this script call is used inside and outside battle.
- After doing some fights, an error can occur (image 1) when I enter combat.
- I will also show the console (image 2).
If I reload the save right before the battle, the error does not occur again. So my theory is that a tempEnemy that was created on a previous fight is responsable for making the error happen on the current fight that crashed the game.
I don't understand much about the subject...