
03-31-2001, 07:50 AM
|
|
Registered User
|
Join Date: Mar 2001
Location: Graal
Posts: 72
|
|
|
How would you make onwall detection for this script?
if (created||timeout) {
if (this.active==1) {
//movement script
if (keydown(0)) {
playery-=0.5;
playerdir = 0;
}
if (keydown(1)) {
playerx-=0.5;
playerdir = 1;
}
if (keydown(2)) {
playery+=0.5;
playerdir = 2;
}
if (keydown(3)) {
playerx+=0.5;
playerdir = 3;
}
setani fglev,l;
disabledefmovement;
}
//Activating or deactivating script.
if (keydown(4)) {
if (this.pressed==0) {
enabledefmovement;
if (this.active==0)
this.active=1;
else
this.active=0;
this.pressed=1;
this.pressed=1;
}
}
else {
this.pressed=0;
}
timeout = 0.05;
}
|
__________________
Quote:
|
Mess with the best, die like the rest...
|
|
|
|
|