Ameranth Posted May 6, 2022 Share Posted May 6, 2022 Hello everyone, I'm using opcode 232 to apply an onHit effect to a character when they are invisible- this works fine, however opcode 232 only checks for states every round, which sometimes feels very slow. Is there an alternative that can apply the onHit effect instantly (or at least faster) whenever invisibility is achieved, or perhaps check for the invisibility state when striking? Quote Link to comment
DavidW Posted May 6, 2022 Share Posted May 6, 2022 Use some different faster check, and have the resource you apply use opcode 318 so as to only affect creatures that have STATE_INVISIBLE. Quote Link to comment
Ameranth Posted May 6, 2022 Author Share Posted May 6, 2022 (edited) Thanks, I didn't get to try exhaustively yet but my plan is to use opcode 272 to use a .eff file every second. The .eff casts a spell, which in turn casts a spell as well as opcode 318 to protect against said spell if not invisible. Is that more-or-less the right direction? It feels a bit convoluted so perhaps there's a better way? EDIT: However I've been looking into opcode 272 and found that it has a storied history of issues; Hopefully there's a safer, but similarly fast check Edited May 7, 2022 by Ameranth Quote Link to comment
Ameranth Posted May 8, 2022 Author Share Posted May 8, 2022 Thanks for your help, this is now solved. I was directed to opcode 326 in Discord, which was perfect for this case. Using 272 to throw 326, the effect was limited to only while influenced by a state of my choice (Invisibility). Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.