POSITION_X = x pixel position in pics1.png
POSITION_Y = y pixel position in pics1.png
this.tile=((int(POSITION_X/16)%16)+(int(POSITION_X/256)*512))+((int(POSITION_Y/16)*16)%512);
Set dir to face X/Y coords ~NPC Baddies
this.dx = mousex;
this.dy = mousey;
if (abs(this.dx)>abs(this.dy)) {
if (this.dx>0) playerdir=3; else playerdir=1;
} else {
if (this.dy>0) playerdir=2; else playerdir=0;
}
Feel free to add more, and if anybody posts more below, I’ll add them to this post :o
I think is more informative, as it breaks it down for the user. Not to mention there are a lot of times you just need the delta’s and not the distance.
Oh, and here is my pics1 to tiles format formula:
[php]POSITION_X = x pixel position in pics1.png
POSITION_Y = y pixel position in pics1.png
this.tile=((int(POSITION_X/16)%16)+(int(POSITION_X/256)*512))+((int(POSITION_Y/16)*16)%512);[/php]
[QUOTE=urza;21984]That pretty much applies to all bar graphics linked to a stat (hp,mp,ap)[/QUOTE]
Ya, that’s why the first one I posted was very vague – to give the idea of what to replace them with.
well actually I can already think of one way I would use it, but it would lag the hell out of Graal.
Anyway nice bump, I never even knew this thread existed.
edit: yeah I knew I wasn’t crazy, this isn’t even stickied. GIVE IT A STICKY FOR CRYIN OUT LOUD.
edit2: since this is in a sticky I might as well point out that that movement system in circles can be used for Bullet Hell simulation/cloning on Graal. If you rework the Graal logic you can even just use it in other programming situations too.