View Single Post
  #8  
Old 03-08-2011, 12:04 AM
callimuc callimuc is offline
ジ
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Hmm I guess I found something similiar. Didn´t test it yet but from looking around in the forums I got this idea (first off player moves from alone to the right):
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.image = "myimage.png";
}
function 
onPlayerTouchsme() {
  if (
player.dir = 2) {
    if (
playerx in |getimgwidth( this.image)| && playery in |getimgheight( this.image)|) {
    
settimer("0.1");
    }
if (!
playerx in |getimgwidth( this.image)| && !playery in |getimgheight( this.image)|) {
    
settimer("0");
    }
  }
}
function 
onTimeout() {
  
playerx += 1;
  
settimer("0.1");
} 
EDIT: added if the player isn´t inside the picture
Reply With Quote