make an npc by changing its facing can put at least one advset without using an iterator. That is, when an npc once cliffturn an advset is activated, something similar to some enemies in the Mario universe. For example, the fifth row sprites
'Gravity .ysp = .ysp + 0.26 if .ysp > 8 then .ysp = 8
'Cliffturn If .stand = 1 then If .facing = 1 then iterator = itrcreate(1, 0, .x+22*.width/64, .y+.height-10, 10*.width/64, 20) Else iterator = itrcreate(1, 0, .x+.width-32*.width/64, .y+.height-10, 10*.width/64, 20) End if
Do iteratornext = itrnext(iterator) If iteratornext = 0 Then Exit do
If block(iteratornext).state = 0 then iteratornext = 1 Exit do End if Loop
If iteratornext = 0 then .facing = 1 - .facing End if