Thread: Improving..
View Single Post
  #3  
Old 09-27-2001, 06:20 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Improving..

sorry to say but your code is the devil...

you have a lot of usless coding...

mabie try this
NPC Code:

if(playertouchsme)
toweapons Boost-up;
if(isweapon&&playerenters)
timeout=0.1;
if(weaponfired)
this.on=1-this.on;
if(timeout&&this.on==1){
for(this.i==0;this.i<4;this.i++) if(keydown(this.i))
if(!onwall(playerx+1.5+vecx(playerdir)*2,playery+1 .5+vecy(playerdir)*2)&&!onwater(playerx+1.5+vecx(p layerdir)*2,playery+1.5+vecy(playerdir)*2)){
playerx+=vecx(playerdir);
playery+=vecy(playerdir);
}
}



try that out... (the onwall and onwater code isn't the best but oh well)...
__________________
Thanks,
-KJL

Last edited by KJS; 09-27-2001 at 06:57 PM..
Reply With Quote