Original Source
- Original title: Uppercut Skill to temporarily remove enemy from battle
- Original author: jshunter
- Original date: February 22, 2025
- Source thread: https://forums.rpgmakerweb.com/threads/uppercut-skill-to-temporarily-remove-enemy-from-battle.175718/
- Source forum path: Game Development Engines > RPG Maker MZ Support
Summary
I've created a skill called an Uppercut for my Brawler class in MZ. It runs an attack animation which punches the targeted enemy off the top of screen. The tricky part is, I want the enemy to return to the ground and take damage 2 turns later. It is effectively a crowd control skill to give the party some breathing room. (In a way in is like the FF Dragoon Jump skill, except it apples to an enemy, not a player.) Here are the requirements: While they are in the...
Archived First Post
Here are the requirements:
- While they are in the air, the enemy cannot act.
- While the enemy is in the air, the player cannot interact with them in ANY way. No attacking, no magic, no items. This includes any ability which affects all enemies. This is NOT the same as making the enemy difficult to hit, or taking zero damage from attacks.
- While in the air, the enemy cannot even be targeted. The UI will not even show them as an option to be selected. They are simply not there. (If this is not possible, at least have an attacking player acknowledge their absence if they try to perform an action on the airborne enemy).
- While they are in the air, if all other enemies are defeated, combat continues. Players will have to take actions which do not target an enemy, like Guard or Heal, to pass the time.
- The Uppercut skill can apply to ANY enemy in ANY battle. Please, no specialized battle events for each Troop. (In practice I may have a check to prevent the skill working on Boss enemies, but that is a solved problem I've already applied to other skills).
- More than one enemy can be affected by the skill; it is possible to have 2 enemies in the air at once (or more, if the duration of the time in the air is increased).
- When the enemy returns to the ground, they land in the same location they were launched from.
The Uppercut Skill. It calls the Uppercut Common event, and applies the Eject state:
Here's the Uppercut Common Event, which provides the animation. (The Brawl Start and End calls are just for common animation actions and can be ignored for now).
Here's the Eject state. It successfully prevents the enemy from acting. The idea of the <JS On Expire State> is to call a Common Event 29 (Downercut) to return the enemy to the ground, take damage, and be targetable again:
Here's Common Event 29 (Downercut) which is supposed to return the enemy to the ground, take damage, and allow them to be targetable in battle once more. It is called by <JS On Expire State> (I've verified this by adding a Text display durng testing), but the rest of it is a work in progress...
There are two problems:
- The enemy is still targetable throughout the sequence. I've cannot find an MZ plugin which applies an Untargetable state to an enemy.
- The Action Sequence to return the enemy to the ground doesn't work because the Targets parameter does not seem to have an applicable option. I can't use "current target" because the player will have selected other targets in the interim. I can't have a variable to hold the index of the enemy because there could be multiple enemies in the air at once.
Update: I've got part-way to a solution. I still don't know how to make an enemy un-target-able yet. However, I have learned how to run an Action Sequence on an enemy when their Eject status (applied by the Uppercut skill) expires. Here's how:
Firstly, I updated the Eject skill so that when it expires, it saves the index of the enemy which had the state to a variable.
<JS On Expire State>
const enemyIndex = $gameTroop.members().indexOf(this);
$gameVariables.setValue(1, enemyIndex);
$gameTemp.reserveCommonEvent(29); //Downercut
</JS On Expire State>
Secondly, I updated the Downercut Common Event to return the enemy to the ground. I couldn't get it to take damage since there wasn't a calling skill (just a state expiration), but I just dealt more damage on the initial Uppercut Common Event. I discovered that the Targets parameter of the MOVE: Float command couldn't take a variable as an argument, but Arthran had written an extension to get around that problem. Thank you Arthran!
Art_BCTargetExtension
Update: I was recommended TheoAllen's Theo_TauntHideTraitplugin and it does the job of preventing single-target skills beautifully. Multi-target skills could still hit the enemy, but applying the immortal skill could fix that.
Since the plugin notes said it was okay to edit the code, I wondered if the plugin could be tweaked to exclude AoE skills. I'm a JavaScript noob, so I asked Copilot to have at it. After three attempts, it came up with a solution which worked. I've attached the modifed version below. Perhaps someone with actual JS skill can further improve upon it.
Thanks to everyone who offered suggestions. This was probably the hardest problem I've encountered in my project.
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...