WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Help with game API, Arthur M., December 3, 2003

Subject: Help with game API From: Arthur M. Date: December 3, 2003

I have a problem here with teh function that animate the char. When i change the between "player" and "playerok" its stop the other animate.  I want to make a function that could make multiple chars animate same time. I know its a bit of work, but please help. Code is a bit messy right now, I apologize for that.

Url for the game http://212.242.163.186/client/client.htm

Function that makes the char animate:

function moveObj(topx,topy,dirx)
{
 
 parserx=topx;
 parsery=topy;
 dirtext=dirx;
 
 person=playerid
 
 if (charcnt<22)
 {
 

  //window.setTimeout("newobj(parserx,parsery)",15);  //15 new
  
  document.all[person].style.top=parseInt(document.all[playerid].style.top)+parseInt(parserx);
  document.all[person].style.left=parseInt(document.all[playerid].style.left)+parseInt(parsery);

  //myobj.style.top=parseInt(myobj.style.top)+parseInt(parserx);
  //myobj.style.left=parseInt(myobj.style.left)+parseInt(parsery);

  moving=true;
  window.setTimeout("moveObj(parserx,parsery,dirtext)",15);  //15 new
  
  
  charcnt++;
  
 }
 else
 {

  document.all[playerid].src=imgpath+'char.stand.' + dirtext + '.gif';
  
  moving=false;
  trigger=false;
  
  charcnt=0;
  //mouseDown()
  
 } 
}

Arthur M.




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX