The Meaning of Life, the Universe, and Everything.
Join Date:
11/16/2012
Posts:
71
Member Details
Hello everyone. I am having trouble trying to figure this out: I am trying to spawn falling sand entities that look like a block I choose. I also need to give it velocity into the air..
Anyone know how I could possibly do this?
I think its possible to spawn sand entities in the air... Actually no it definitely is
var x = Player.getX();
var y = Player.getY();
var z = Player.getZ();
//Some varibles we will use later to get the player location
function newLevel()
//When someone loads a world
{
setTile(x, y+10, z, sand);
//Set falling sand ten blocks above their location
clientMessage("Trol lol lol xD");
}
May not work... and i dont think its possible to skin sand entities, but if anyone can help then i would be happy to kmow!
Rollback Post to RevisionRollBack
Please give me an Internet. Please. Pretty Please with sprinkles on top
I have a twitter!! Follow me for regular updates on my mods! https://twitter.com/DamienMiller11
I think its possible to spawn sand entities in the air... Actually no it definitely is
var x = Player.getX();
var y = Player.getY();
var z = Player.getZ();
//Some varibles we will use later to get the player location
function newLevel()
//When someone loads a world
{
setTile(x, y+10, z, sand);
//Set falling sand ten blocks above their location
clientMessage("Trol lol lol xD");
}
May not work... and i dont think its possible to skin sand entities, but if anyone can help then i would be happy to kmow!
Okay, but I need to know how to give it a velocity. I was thinking of having the falling sand ride a mob, but not sure on how to do that..
Okay, but I need to know how to give it a velocity. I was thinking of having the falling sand ride a mob, but not sure on how to do that..
Here's how you do it:
function procCmd(c)
{
var c.split(" ");
if(c[0]=="sand")
{
var x = Player.getX();
var y = Player.getY();
var z = Player.getZ();
var sand = Level.spawnMob(x,y+10,z,66,"/mobs/char.png"); //This will spawn Falling Sand 10 blocks above the player
Entity.setRenderType(sand,3);
// then you can use Entity.setVelX(sand, amount); or Entity.setVelY() and Entity.setVelZ()
}
}
Anyone know how I could possibly do this?
var x = Player.getX(); var y = Player.getY(); var z = Player.getZ(); //Some varibles we will use later to get the player location function newLevel() //When someone loads a world { setTile(x, y+10, z, sand); //Set falling sand ten blocks above their location clientMessage("Trol lol lol xD"); }May not work... and i dont think its possible to skin sand entities, but if anyone can help then i would be happy to kmow!
I have a twitter!! Follow me for regular updates on my mods!
https://twitter.com/DamienMiller11
Okay, but I need to know how to give it a velocity. I was thinking of having the falling sand ride a mob, but not sure on how to do that..
Here's how you do it:
function procCmd(c) { var c.split(" "); if(c[0]=="sand") { var x = Player.getX(); var y = Player.getY(); var z = Player.getZ(); var sand = Level.spawnMob(x,y+10,z,66,"/mobs/char.png"); //This will spawn Falling Sand 10 blocks above the player
Entity.setRenderType(sand,3);
// then you can use Entity.setVelX(sand, amount); or Entity.setVelY() and Entity.setVelZ()
}
}Hope this helps!~Matt