
09-03-2003, 12:41 AM
|
|
call me Chad, it's cooler
|
 |
Join Date: Aug 2002
Posts: 1,899
|
|
|
Don't get mad at Kai, he's telling the truth, you're just not understanding (which is pretty much understandable). Let me clarify for you, you have two major problems with the code;
1. there are quite a few more lines than there needs to be, meaning you can break down all those separate if checks for each direction into a for loop, but I'll let you figure how to fix that on your own
2. your wall check is highly innacurate, it only checks immediately, well actually I have no idea where you were going with those numbers... but it would greatly improve upon your script to do some dynamic checking, meaning you should check the area the player will be moving to before you actually send him/her there using your "momentum" variables and playerx/y
oh and vecx/vecy are your friends when using for loops to compile directional scripts |
|
|
|