Thread: onwall help
View Single Post
  #4  
Old 08-14-2003, 07:30 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
if (!onwall(playerx+this.walkSpeed+vecx(i)*this.walkSpeed,playery+this.walkSpeed+vecy(i)*this.walkSpeed)){
unless the player is getting bigger as he goes faster, use x+1.5,y+2

Quote:
this.lastStep=strtofloat(i);
i isn't a string here so you don't need the strtofloat()

and I would suggest an increment checker for speed movements so you cant bump into a wall when your not even touching it as you go fast. meaning use a for loop inside the keydown to check each tile before the one you want to move to and jump to the furthest one without passing over a wall
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote