I would like to create an invisible block in the game that would be unpassable only if var blocade_notpassable=1

I put some map entity in game with this example action

action invisible_blocade(){
my.invisible=on;
if (blocade_notpassable == 1){ my.passable=off;}
if (blocade_notpassable == 0){ my.passable=on;}
}

Why this not work, and how make this?