Graal Forums  

Go Back   Graal Forums > Development Forums > Level Design
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-15-2001, 07:55 AM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
Unhappy

How would I edit this so that it can go everywhere and not hit invisible objects as if it were in the tygcpolo area which I dun like :P (playerenters) {
timeout=0.05;
}

if(timeout){
ballx=x;
bally=y;
for(this.i=0;this.i<playerscount;this.i++){
if(abs(x-players[this.i].x)<=2&&abs(y-players[this.i].y)<=2&&!strequals(#n(this.i),)&&abs(this.xspeed)< =0.25&&abs(this.yspeed)<=0.75){
this.xspeed=x-players[this.i].x;
this.yspeed=y-players[this.i].y;
}
}
if(abs(this.xspeed)>0.01){
this.xspeed*=0.9;
if((x+this.xspeed)<44.5&&(x+this.xspeed)>20.5) x+=this.xspeed;
else this.xspeed*=-1;
this.xspeed+=random(-0.001,0.001);
}//else this.xspeed=0;
if(abs(this.yspeed)>0.01){
this.yspeed*=0.9;
if((y+this.yspeed)<49&&(y+this.yspeed)>12) y+=this.yspeed;
else this.yspeed*=-1;
this.yspeed+=random(-0.001,0.001);
}//else this.yspeed=0;

if(x>30.5&&x<32.5){
if(y<13){
x=30.5;
y=29.5;
this.xspeed=0;
this.yspeed=0;
npcs[1].timeout=0.05;
redscore++;
}else if(y>48){
x=30.5;
y=29.5;
this.xspeed=0;
this.yspeed=0;
npcs[2].timeout=0.05;
bluescore++;
}
}

if(abs(this.xspeed)>0.5||abs(this.yspeed)>0.5){
showimg 0,charshadow.gif,x+0.5,y+1.5;
hide;
}else{
hideimg 0;
show;
}
showimg 1,ball.png,x+0.6,(y+1)-((abs(this.xspeed)+abs(this.yspeed))*0.5);
timeout=0.05;
}
Reply With Quote
  #2  
Old 04-15-2001, 09:18 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Mou, where'd you get that?
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #3  
Old 04-15-2001, 09:35 AM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
pants

PANTS!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.