Quote:
Originally Posted by callimuc
so you expect him to write down all blocking tiles while he could do a simple onwall(), onwall2() or tiletype() check?
things you should fix:
PHP Code:
setani("ani", params); //proper gs2; if you dont have params make it NULL (params part)
this.indodge = boolean; //boolean is true or false; should be used instead of using (un)set
for (temp.i = 0; temp.i < 4; temp.i++) {
if (onwall2(player.x+0.5, player.y+1+1, 2, 2)) continue;
//onwall2(x, y, width, height);
//at the player.y part i added two +1 because the first is to have it go down to the "default" block check and the
//2nd one is for the new y position, personal reference of doing it like this; should be fixed with '-' or at the
//'player.x' parts when you are using it in other directions
//continue should make it leave the for() loop when you are on the wall (regarding the check)
player.y += 1;
sleep(.1);
}
|
Whatever.
There are many ways of achieving the same thing.
I was simply providing one.