View Single Post
  #2  
Old 02-23-2009, 06:22 PM
hotrian hotrian is offline
Who?
Join Date: May 2003
Location: Eatonville, Washington, 98328
Posts: 56
hotrian is on a distinguished road
Send a message via AIM to hotrian Send a message via MSN to hotrian
bored enough to post..

Quote:
Originally Posted by GULTHEX View Post
PHP Code:
//#CLIENTSIDE

if (weaponfired){
clientr.m16=1;}
{if(
clientr.m16=1);

function 
onKeyPressedcodekey ) {
  if ( 
key == "g" ) {
    
setshootparams PARAMEQUALS;
  
//shoot x,y,z,angle,zangle,power,gani,ganiparams;
  
shoot this.x,this.y,playerz,(playerdir 1) * pi 2,,,shuriken,;
  
setani dg_m16-fire,;
  
replaceani idle,dg_m16-idle;
  
replaceani walk,walk;
  
freezeplayer 0.0383;
  
sleep 0.1;

  
//up
if (playerdir=0)
  
this.x=playerx-1;
  
this.y=playery-2;

//left
if (playerdir=1)
  
this.x=playerx-2;
  
this.y=playery;

//down
if (playerdir=2)
  
this.x=playerx+1;
  
this.y=playery+2;

//right
if (playerdir=3)
  
this.x=playerx+2;
  
this.y=playery;


if (
actionprojectile) {
  if(
strequals(#p(index),PARAMEQUALS)) {
  
}}}}} 
What?

PHP Code:

if (weaponfired){
clientr.m16=1;}
{if(
clientr.m16=1); 
It's been a while, but I don't think this math is correct.
PHP Code:
 (playerdir 1) * pi 
Without brackets, only the line directly after an if statement is actually checking the statement; The second line is always running with your methods. Also, You're horribly mixing GS1 with GS2..

And why are you setting these after you have already "shot" the bullet? More than that, this.x and this.y are reserved vars; Use something else like this.dx and this.dy
PHP Code:
if (playerdir=1)
  
this.x=playerx-2;
  
this.y=playery
What are these closing?

PHP Code:
}}}}} 
'scuse me if I'm horribly wrong :3
__________________
Sometimes I wonder if I think too big.
Quote:
Originally Posted by Admins
I've moved the fox map to "levelstoobig/" because a terrain gmap of 1024x1024 levels is clearly too huge (the kingdoms main map is 40x40 and is already quite big). It was taking a lot of memory and was slowing down the computer.
Reply With Quote