Just following up on this topic because I have made a discovery: we cannot actually use Text Events to auto-recast a fizzled spell because the message "You begin casting XXXXXX" is only prompted when a spell is cast successfully, but NOT when it fizzles! Therefore, the value stored in the global variable LastSpellCast is NOT updated when the spell fizzles - instead, it keeps the value of the latest spell that had been successfully cast prior to the fizzle! The end result of that is that my code, upon a fizzle, attempts to recast the successful spell prior to the fizzle, not the spell that has actually fizzled.
See screenshot attached, where I was alternating (manually casting) Force Shield and Death Peace. You will observe at the top of the screenshot that Force Shield was successfully cast (and successfully stored in the global variable LastSpellCast). Right afterwards, I fizzled Death Peace a few times. Please note that there's no "You begin casting Death Peace" prompted in the screen, so the value of the global variable never updated from "Force Shield" to "Death Peace". The proof is that the print(LastSpellCast) command keeps printing on screen "[MQ2] Force Shield" even though I was indeed casting (fizzling) Death Peace.
So yeah: we cannot use Text Events to capture the value of LastCastSpell upon a fizzle.
Can you think of any alternative way?
See screenshot attached, where I was alternating (manually casting) Force Shield and Death Peace. You will observe at the top of the screenshot that Force Shield was successfully cast (and successfully stored in the global variable LastSpellCast). Right afterwards, I fizzled Death Peace a few times. Please note that there's no "You begin casting Death Peace" prompted in the screen, so the value of the global variable never updated from "Force Shield" to "Death Peace". The proof is that the print(LastSpellCast) command keeps printing on screen "[MQ2] Force Shield" even though I was indeed casting (fizzling) Death Peace.
So yeah: we cannot use Text Events to capture the value of LastCastSpell upon a fizzle.
Can you think of any alternative way?




