This is my attempt at making a graal sporting event. It’s buggy as hell, but Chicken and I were playing online with it the other day, and it was actually kind of fun.
if (playertouchsme) {this.ball=1;
}
if (playerenters) {this.ball=0;timeout=.05;}
if (timeout) {
if (this.ball==1) {
dontblock;
disableweapons;
if (playerdir==2 || playerdir==3 || playerdir==1) {drawoverplayer;
x=playerx;
y=playery+1;}
if (playerdir==0) {drawunderplayer;
x=playerx;
y=playery;}
if (keydown(4)) {this.speed+=.1;setplayerprop #c, #v(this.speed);
freezeplayer .05;
playersprite=21;
this.trigger=1;}
if (!keydown(4)&&this.trigger==1) {playersprite=23;
this.ball=0;this.trigger=0;this.thrown=0;this.fire=1;
}
}
if (this.ball==0&&!this.thrown==1) {enableweapons;
if (playerdir==0) {this.dir=0}
if (playerdir==1) {this.dir=1}
if (playerdir==2) {this.dir=2}
if (playerdir==3) {this.dir=3}
this.thrown=1;
}
if (this.speed>0&&this.fire==1) {this.speed-=.1;
if (this.dir==0) {y-=this.speed}
if (this.dir==1) {x-=this.speed}
if (this.dir==2) {y+=this.speed}
if (this.dir==3) {x+=this.speed}
}
if (this.speed==0) {this.thrown=0;this.fire=0}
if (onwall(x+1,y-.5)||onwall(x,y+1)||onwall(x+3,y+1)||onwall(x+1,y+3.5)) {
if (this.dir==2) {this.dir=0}
if (this.dir==3) {this.dir=1}
}
if (onwall(x-1,y+.5)||onwall(x,y-1)||onwall(x-1,y-1)||onwall(x-1,y-1.5)) {
if (this.dir==0) {this.dir=2}
if (this.dir==1) {this.dir=3}
}
timeout=.05;
}