View Single Post
  #11  
Old 05-09-2007, 06:59 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Make the object an image, use a class.
HTML Code:
function onCreated()
{
  this.dropObject = (this.dropObject? this.dropObject: "block.png");
  
  this.showCharacter();
  this.setCharAni("myplaceholder", this.dropObject);
}
HTML Code:
function onCreated()
{
  //Make this a database
  //Change the random(0, THISRANDOM) to the overworld size * 64
  this.warpto(this.level.name, random(0, THISRANDOM), random(0, THISRANDOM));
  while if (onwall2(this.x, this.y, 2, 2))
  {
    this.warpto(this.name, random(0, THISRANDOM), random(0, THISRANDOM));
  }
  this.dropObject(randomstring("bush", "tree", "plant"));

  scheduleevent(10, "Created", "");
  //Repeat this process every 10 seconds.
}    
function dropObject(objectName)
{
  with(putnpc2(objectx, objecty, "join objectHolder;"))
  {
    this.dropObject = thiso.objectName @ ".png";
  }
}
Reply With Quote