


When you select an item that allows you to select your target, a target window will appear. Let’s look at some of these steps in detail. That is exactly the behaviour you expect. This sounds straightforward: you pick an enemy, and the skill is applied on the enemy. When the action is executed, the information is used to apply the skill to the correct enemy that you’ve selected.A Game_Action object is created with the index of the target (zero, because Ruby) and the skill set as the action.The battler chooses to cast fire on the first enemy.The engine brings up the target selection window asking you to select a target.The engine checks the scope of the skill and determines that it may target “one enemy”.This is the general workflow in the default battle system, supposing that you want your actor to attack an enemy. Now that the basics are out of the way, we look at how targeting is implemented. You can verify this in the Game_Enemy class. You can verify this in the Game_Actor class def friends_unitįor enemies, the opposite is true. For actors, allies are members in the party, and opponents are members in the troop. Recall that the default battle system consists of two units of battlers: the party and the troop. The party holds all of the actors, and the troop holds all of the enemies.Įvery battler has their own idea of who an ally is, and who an opponent is. The scope uses terms like “ally” and “enemy” to describe who the targets are. The scope determines who you may select as a target. Check the help file for a description of each one, but they should be self-explanatory, You can see the list of default scopes in the database editor. Target ScopeĪll items and skills have a scope. Similarly, if you want to attack a Slime, we say the Slime is the target of your attack. We say that the ally is the target of your healing spell. For example, you want to cast a Heal spell on your ally. In the context of battle actions (or actions in general), targeting refers to the object that an action will be used on. I provide a number of examples of different game mechanics that I use to put the target system to the test. The purpose of this article is to understand how the target system works, and determine whether it is designed well. This article discusses the targeting system in the default battle system in RPG Maker VX Ace.
