View Single Post
  #3  
Old 06-17-2014, 12:23 AM
blackbeltben blackbeltben is offline
Registered User
Join Date: Aug 2011
Posts: 83
blackbeltben is on a distinguished road
Quote:
Originally Posted by fowlplay4 View Post
PHP Code:
function onCreated() {
  
setImg("blackbeltben_bullet.png"); 
  
setShape(13232); 
  
moveBullet();
}

function 
movebullet() {
  
temp.dx this.newx this.x// delta = final position - initial position
  
temp.dy this.newy this.y;
  
temp.dist vectordist({this.xthis.y0}, {this.newxthis.newy0}); 
  
temp.speed 0.5;
  
temp.time temp.dist temp.speed;
  
move(temp.dxtemp.dytemp.time0);
  
setTimer(temp.time);
}

function 
onTimeout() {
  
destroy();


Please forgive me if this sounds like a dumb question.. But what is the point of putting temp? Couldn't you just put this.dy, this.dist... etc

Keep in mind I don't know much about "temp" stuff
Reply With Quote