if you're just switching to a special sprite that has some sort of cool animation, you just need to check if the variable is equal to 1 and set the sprite index:
Code:
if(variable == 1) {
sprite_index = /* your_special_sprite */ }
if the variable only switches between 1 and 0 (true and false) you can also just do:
otherwise, if you're asking how to make a certain effect, it'd be helpful if you provided some pics of what it looks like.