View Single Post
  #4  
Old 04-29-2011, 08:51 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
For staff boots you will never need to know this.. instead use something more along the lines of:

PHP Code:
for ( i=0i<4i++ ) {
  if ( 
keydown(i) ) {
    
player.+= vecx(i) * this.speed;
    
player.+= vecy(i) * this.speed;
  }

Vec X/Y would give you -1,0,1 depending on direction. I am not completly sure how to explain it to you but I understand how it works. If im not mistaken its for finding vectors?

This greatly reduces your script length and makes it easier to modify.
Reply With Quote