yukkimi0100 Posted August 14, 2024 Posted August 14, 2024 How do I block a skill from being used only if the user's life is < or = a X%? I tried to do it via onPcUseSkillEvent however this means that even if the skill is blocked, it goes on cooldown Quote
0 Playtester Posted August 20, 2024 Posted August 20, 2024 Look at how Magnum Break is done. Requires: HpCost: - Level: 1 Amount: 20 - Level: 2 Amount: 20 - Level: 3 Amount: 19 - Level: 4 Amount: 19 - Level: 5 Amount: 18 - Level: 6 Amount: 18 - Level: 7 Amount: 17 - Level: 8 Amount: 17 - Level: 9 Amount: 16 - Level: 10 Amount: 16 SpCost: 30 First you define a HP cost. You can also use "HpRateCost" for percentual cost. Then you want to make sure the HP is only required but not consumed. For this go to skill.cpp and find "void skill_consume_hpspap". switch (skill_id) { //Skills that require HP but do not consume them case SM_MAGNUM: case MS_MAGNUM: hp = 0; break; Now you just need to add your skill here, so it doesn't consume the HP that it requires. Quote
Question
yukkimi0100
How do I block a skill from being used only if the user's life is < or = a X%?
I tried to do it via onPcUseSkillEvent however this means that even if the skill is blocked, it goes on cooldown
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.