Ball Thing

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;
}

Needs a gif. Level is by Chicken.

So old chief. Same as the level… tileset is all fucked up on it also.

i’m hoping someone will make something cool with it.

i enjoyed it

There is a built-in soccer ball on Graal. LOL

dodgeball !

It only works on a single, specifically named level. Do you remember what the level name should be? I don’t. :frowning:

house3.nw? I’ll find it.

___Merged doublepost__________________

try level1.nw

How about level1.graal? :slight_smile:

Indeed, it was level1.graal. This was the name of the level behind Brother’s House, and the name of the level outside of Brother’s is level2.

I remember trying to make my very first town and wondering why the hell there was a fucking soccer ball in the middle of my town square >: (

They had one in the middle of Babord, worked pretty well.

[CODE]if(created){
dontblock;
showcharacter;
setcharani soccer_idle,;
}

if (playerenters||timeout){
if(abs(x-playerx)<=2
&&abs(y-playery)<=2
; &&!strequals(#m(-1),soccer_kick)
&&abs(this.x)<=0.25
&&abs(this.y)<=0.75){
this.x=x-playerx;
this.y=y-playery;
setcharani soccer_kick,;
}
if(abs(this.x)>0.01){
this.x*=0.9;
if(!onwall(x+this.x,y+1)&&!onwall(x+this.x+2,y+1)) x+=this.x;
else this.x*=-1;
this.x+=random(-0.001,0.001);
}else this.x=0;
if(abs(this.y)>0.01){
this.y*=0.9;
if(!onwall(x+1,y+this.y)&&!onwall(x+1,y+this.y+2)) y+=this.y;
else this.y*=-1;
this.y+=random(-0.001,0.001);
}else this.y=0;
if(x<1||x>61||y<1||y>61){
putleaps 4,x,y;
x=30.5;
y=35;
}
timereverywhere;
timeout=0.05;
}[/CODE]

level1.graal. Not level1.nw. It doesn’t work if you make it a .nw level. The client looks specifically for level1.graal.

-.o Can’t believe I remembered.

not a bad script but if u hold it to long then let it go it flies through the walls

___Merged doublepost__________________

o and i know my name is spelled wrong i waNTED IT TO BE SPELLED LIKE THAT

k o__o

Nobody reply.