Hi!
for loop looks like this
for( set(i,0), i LT 20, inc(i),
...
actions
...
);
so, in your case it must be
for( set(i,0) , i LT 20, inc(i),
textdd(var1,img,get(i));
set(plugin[get(var1)].visible,true);
wait(3);
add(somevar,get(i),2);
textdd(var2,img,get(somevar));
set(plugin[get(var2)].visible,true);
set(plugin[get(var1)].visible,false);
);
NOTE! - don't use "image" variable name, it's reserved krpano tag.
for use variable value use get() action
wait - is the wait(delay) action -> wait(3);
actions add,sub, mul etc. can't be used in other actions directly.
Regards
Andrey
PS - hope this little tutorial will help you understand krpano actions logic