I am trying to make enemies do a sequence of skills based on certain actor statuses.
For example, yeti grabs main character and if it's still being held the turn after, he will crush him.
I created a custom condition for the main character while being held and gave him a struggle ability to try and break free before he gets killed.
The problem now is, how do i make the yeti enemy trigger the crush skill? Under condition there are only "self" state and not opponent state.
I have tried using a switch when the yeti use the grab skill but how do i let it know to not trigger if the skill fails (50% accuracy)
Been testing it and the switch triggers even if he misses the skill.
Is there a way to trigger a switch when player enter certain status condition?
Hmm but i cannot link crush to held status.
Unless you mean giving held status as a yeti "buff" and have the player try to remove it but in that case how do i prevent the player from using attacks/skills without actually applying the debuff?
I prefer also having it as player debuff since in the future i plan having multiple enemies using combos based on that.
How i did it right now was:
Yeti uses grab
Grabs inflict a debuff which prevent all actions and add struggle ability, triggers common event with the character talking/CG showing and enables switch 001
If switch 001 is on, yeti uses crush
If player struggles, switch 001 turns off
My only problem is, the event happens regardless if the yeti grab lands or misses. Also if the player successfully struggles, the yeti still uses crush because the switch was on at the beginning of the turn.
Edit:
Thinking about it more, I think you'll need a "Grab" and a "Held" status. Something like this:
Skill Grab is used -> Have Grab added to the enemy automatically with a.addState(10); in the damage formula-> chance to inflict "Held" state in Effects in skills
held state restricts all skills, is set to remove after 2 turns and adds struggle skill
Struggle skill is used against the enemy -> chance of removing the enemy's grab status
Crush skill set to high priority with a "Grab" status requirement
Crush skill used (targets all enemies)-> in the damage formula, do an if statement:
if (b.isStateAffected(10))
{damage formula;}
else
{0;}
Also have the Crush skill remove the "Grab" status
Thats the only technique I can think of. The only downside with this way is that your other party members not affected by the status will appear to be taking 0 damage... Not sure of a way around that.
I didn't try it out myself, but it should work.
Let me know if you have any questions.
Edit: One more thing is that the Yeti would be using Crush skill no matter what if the first initial grab failed. I'm not sure of a way around this, but at least it wouldn't damage the players.
One more edit: Added in { } for the damage formula... not sure how i forgot about that.
I'm confused. How can i have a skill target both user and enemy and give them a buff/debuff respectively?
You have the skill target the enemy. In the damage formula you can add a.addState(10); to add the state to the enemy that uses the skill, and either b.addState(10); after that or add it in the effects.
Edit:
I forgot to add for the crush skill you'll also need to add:
a.removeState(stateId)
to the damage formula line:
Edit:
So something like this:
if (b.isStateAffected(HeldID))
{a.removeState(GrabID); damage formula; }
else
{a.removeState(GrabID); 0}
Ooh i see.
All this stuff wasn't in the random tutorials i found on youtube lol.
I managed to get it working.
Now the only problem is the event text/CG triggering even if the enemy fails the grab.
But thank you so much for the help!
You can implement something in the Troops part for that. Have the conditions set for turn end and have the span set for "turn".
then you can set up some conditions in there.
Let me know if you have any questions 🙂
I'm guessing i'm doing something wrong.
Do i need a specific trigger? Simply adding the conditional branch and getting the status effect doesn't seems to be working.
edit:i got it working, thanks!
I was looking back at this thread and thought of something a little better than having the crush skill target all. I was looking at my High Jump skill for an example, and with one of yanfly's plugins (Buffs and States Core) you can have the yeti target that specific person instead of targeting all:
In the Grab status notepad:
// Buffs & States Core
<Custom Leave Effect>
// Get the crush skill.
var skill = 62;
// Get the last targeted index.
var target = -2;
// Queue the forced action.
BattleManager.queueForceAction(user, skill, target);
</Custom Leave Effect>
With this, you wouldn't even need crush to be set as a skill for the enemy, as having the grab status would trigger this. You would change the Crush skill to target one person. Let me know if that works 🙂