Okay, I'm a complete newbie with scripting so I'm just gonna go ahead and ask. This time I swear it's an actual problem I'm having and not something stupid I overlooked.
For a certain attack sequence I want the enemy to move in, then I want both the enemy and his target to disappear, and then I want an animation to play, then they will both reappear and the enemy will move back to position. I know
[:visible, false], takes care of the user of the attack disappearing, but I can't figure out how to get the target player character to disappear while the enemy is attacking.
Edit: I think the
[:if] function included with the script can help me out here. Until I get a reply I'll continue to attempt tackling the problem on my own. Will report back if I finish before getting help.
Double Edit: Okay, this took me a few hours to figure out, but thanks to the flexibility of TheoAllen's excellent script I was able to piece together a method that works and gives me what I need. If anyone wants to ever do the same I'll cover the method I used here.
So here's what I did. I created a common event with a switch called "pinattack", then I hooked it under a conditional branch that would alternate it on and off every time it's called.
Then I went into the script and modified the K_Hurt animation using the
[:if] function:
What this ensured is that if the pinattack switch is turned on, then the pose that sets is a blank square(making the battler invisible), for the duration of 11 seconds.(Long length to make sure it works.)
If the pinattack switch is off, which it will be with every other attack but this specified attack, then the normal K-Hurt animation is played.
Next, I went and modified the Orc's Pin attack:
At the beginning of the attack sequence the common event that turns the switch on is called, to ensure that the target disappears when
[:target_damage] is applied. Afterwards the attack plays out as normal and the attacker's visibility is set to false to make them both invisible
. The
[:wait] command here, like the long frame rate hold of the last chunk of script, is simply test filler.
After the attack is played out the common event is called once more to turn the switch off, ensuring that no one disappears when normal attacks happen, and the battle resumes.
The animation is a bit janky, so I'll probably add the first two commands of the Orc's attack to a prep slot and use them as a preparation sequence with a small animation. should smooth it out a bit, but that's the core of what I needed.