yukkimi0100 Posted August 14, 2024 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 12/02/18 Last Seen: September 30, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Playtester Posted August 20, 2024 Group: Developer Topic Count: 37 Topics Per Day: 0.01 Content Count: 897 Reputation: 248 Joined: 01/30/13 Last Seen: 2 hours ago Share 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 Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.