Make a skill use a common event before usage.

I am trying to event a battle cut in screen with out using a script and would like to know if there a way to link a common event to a skill to do so. Let me go into further detail of this.(No this not a question of how to event the situation cause I think I got that figured out.)

Battle back is for reference only and is owned by Kaduki. I only own the character. If used please use my official version which a exclusive promo I made for another site at the bottom of the post.

Ok so I have the battle cut in back below

Spoiler
[IMG]http://imageshack.us/a/img5/7992/30kj.png[/IMG]
that I make appear when a certain skill is selected along with a flash of light and a SE for the flash then I have the character zoom in into the back like so which also a sound for the slide and a voice saying something that will be a sound effect.

"Image example:

Spoiler
[IMG]http://imageshack.us/a/img268/89/xc9.png[/IMG]
Then the character will zoom off the screen and the battle back will fade out. This will be done in a common event which after executed will play the skill.

So the question is how can I link my CE to a skill.

The cut in character with my own back is available for people to use exclusively here face set and sprite will be available soon. Please tell me take this last part out if it is violating the rules just figured since I am using it as an example mine as well let people now about it since its an RRR promo.
maybe try running the CE using the formula box...
I don't think so. To run a common event via a skill, you populate the "reserved common event id", but it doesn't actually run it until after damage is calculated.


I believe you'll need a script mod for this, so I'm going to pop this into script requests. I have a feeling it's been asked before, so if you search a bit, you might find a solution.
or simply use a placeholder skill instead of the actual one... the actor uses the placeholder, activates CE and the CE forces user to use the actual skill...

maybe that's the farthest you can go without scripts (since your very first line was about how you want to know how to do it without scripts)
i wrote this for myself on MZ

put note on skill: <ForceCE:10>
this should play the common event 10 before the action.

but it requires your first skill (skillId=1) to be empty.

if thats ok for you feel free to use or adjust it
just copy it into a text file, change .txt to .js and include it



var $GlobalCEFlag = false;
var GameBattler_currentAction = Game_Battler.prototype.currentAction;
Game_Battler.prototype.currentAction = function() {
if(this._actions[0]){
const noteForce = $dataSkills[this._actions[0]._item._itemId].meta.ForceCE;
if(!$GlobalCEFlag && noteForce){
$gameTemp.reserveCommonEvent(parseInt(noteForce));
$GlobalCEFlag=true;
let nullAction = new Game_Action(this, true);
nullAction.setSkill(1);
nullAction._item._itemId=1;
this._actions.unshift(nullAction);
return nullAction;
}
else return GameBattler_currentAction.call(this);
}
else return GameBattler_currentAction.call(this);
}
var BattleManager_ProcessTurn = BattleManager.processTurn;
BattleManager.processTurn = function() {
if (this._subject.currentAction()) if (this._subject.currentAction()._item._itemId==1) { this._subject.removeCurrentAction(); return; }
BattleManager_ProcessTurn.call(this);
$GlobalCEFlag=false;
}
Necro-post notice: @Jobiia

This thread is over 9 years old. This may be the biggest necropost we've ever had here.

Please put your code into code tags to preserve formatting and make it easier to read in future.

I suspect this MAY work in Ace (I have not tried it), but in Ace, you add your scripts via the editor, not in a separate script file, and Ace does not use .js

Original thread: https://forums.rpgmakerweb.com/threads/make-a-skill-use-a-common-event-before-usage.16884/