
09-27-2001, 05:42 AM
|
|
Banned
|
 |
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
|
|
Improving..
|
well i was working on this to make the speed of player faster but not go on walls well it works but sometimes you get stuck on a wall..
if anyone can help improve i'd appreciate it, thanks.
// NPC made by Merlin
//9-26-01
//speed up
if (playertouchsme) {
toweapons Boot-Test;
this.mode = 0;
}
if (weaponfired) {
if (this.mode==0) {
setplayerprop #c,Boots off;
this.mode=1;
timeout = 0;
}
elseif (weaponfired) {
if (this.mode==1) {
setplayerprop #c,Boots on;
timeout = .5;
this.mode = 0;
}
}
}
if (timeout) {
timeout = .1;
}
if (timeout) {
if (keydown(0)) {
if (this.mode==0) {
if (!onwall(playerx,playery)) {
playery--;
timeout = .1;
}
}
}
}
if (timeout) {
if (keydown(2)) {
if (this.mode==0) {
if (!onwall(playerx,playery)) {
playery++;
timeout = .1;
}
}
}
}
if (timeout) {
if (keydown(1)) {
if (this.mode==0) {
if (!onwall(playerx,playery)) {
playerx--;
timeout = .1;
}
}
}
}
if (timeout) {
if (keydown(3)) {
if (this.mode==0) {
if (!onwall(playerx,playery)) {
playerx++;
timeout = .1;
}
}
}
}
if (playerenters||created) {
if (this.mode==1) {
timeout = .1;
}
} |
|
|
|