The Meaning of Life, the Universe, and Everything.
Join Date:
1/8/2014
Posts:
59
Member Details
Please tell me whats wrong with this script it is holding up development on my mod big time.
var X = ModPE.readData("mX");
var Y = ModPE.readData("mY");
var Z = ModPE.readData("mZ");
var alive = 1
var health = 100
if (alive =1)
{
ModPE.saveData("mX", getPlayerX() + 2);
ModPE.saveData("mY", getPlayerY());
ModPE.saveData("mZ", getPlayerZ());
clientMessage("He has come");
}
If you are interested in what this mod is going to be pm me, this mod is going to be pretty cool and I don't want to tell the entire community and get people to start making mods like this and finish it before I can even get halfway finished.
Please tell me whats wrong with this script it is holding up development on my mod big time.
var X = ModPE.readData("mX");
var Y = ModPE.readData("mY");
var Z = ModPE.readData("mZ");
var alive = 1
var health = 100
if (alive =1)
{
ModPE.saveData("mX", getPlayerX() + 2);
ModPE.saveData("mY", getPlayerY());
ModPE.saveData("mZ", getPlayerZ());
clientMessage("He has come");
}
If you are interested in what this mod is going to be pm me, this mod is going to be pretty cool and I don't want to tell the entire community and get people to start making mods like this and finish it before I can even get halfway finished.
What are the conditions of the Boolean "alive"? Does "alive" exist in the game, or did you add it? Also var health, whose health does it refer to, yours or "alive"'s? Your section of code is dependent on other areas of code, please post them as well.
var X = ModPE.readData("mX");
var Y = ModPE.readData("mY");
var Z = ModPE.readData("mZ");
var alive = 1
var health = 100
if (alive =1)
{
ModPE.saveData("mX", getPlayerX() + 2);
ModPE.saveData("mY", getPlayerY());
ModPE.saveData("mZ", getPlayerZ());
clientMessage("He has come");
}
hmmmm... who is alive? the player im guessing...
its more like:
var ini=false;
var alive;
var px,py,pz;
function selectLevelHook()
{
if(!ini)
{
ModPE.readData("plx");
ModPE.readData("ply");
ModPE.readData("plz");
ini=true;
}
}
function modTick()
{
if([color=#000000]Entity.getHealth(getPlayerEnt())[/color]>0)
{
alive=true;
}
else if(Entity.getHealth(getPlayerEnt())==0)
{
alive=false;
}
if(alive)
{
px=Player.getX();
py=Player.getY();
pz=Player.getZ();
}
}
}
function leaveGame()
{
ModPE.saveData("plx",px);
ModPE.saveData("ply",py);
ModPE.saveData("plz',pz);
}
perhaps?
Please give more details via PM.
If i helped you please press the button ---------------------------------------------->
var X = ModPE.readData("mX");
var Y = ModPE.readData("mY");
var Z = ModPE.readData("mZ");
var alive = 1
var health = 100
if (alive =1)
{
ModPE.saveData("mX", getPlayerX() + 2);
ModPE.saveData("mY", getPlayerY());
ModPE.saveData("mZ", getPlayerZ());
clientMessage("He has come");
}
If you are interested in what this mod is going to be pm me, this mod is going to be pretty cool and I don't want to tell the entire community and get people to start making mods like this and finish it before I can even get halfway finished.
What are the conditions of the Boolean "alive"? Does "alive" exist in the game, or did you add it? Also var health, whose health does it refer to, yours or "alive"'s? Your section of code is dependent on other areas of code, please post them as well.
Servers Rules|Support Forum Rules|Show Your Creation Rules|Off Topic Rules
var Y = ModPE.readData("mY");
var Z = ModPE.readData("mZ");
var alive = 1
var health = 100
if (alive =1)
{
ModPE.saveData("mX", getPlayerX() + 2);
ModPE.saveData("mY", getPlayerY());
ModPE.saveData("mZ", getPlayerZ());
clientMessage("He has come");
}
hmmmm... who is alive? the player im guessing...
its more like:
var ini=false; var alive; var px,py,pz; function selectLevelHook() { if(!ini) { ModPE.readData("plx"); ModPE.readData("ply"); ModPE.readData("plz"); ini=true; } } function modTick() { if([color=#000000]Entity.getHealth(getPlayerEnt())[/color]>0) { alive=true; } else if(Entity.getHealth(getPlayerEnt())==0) { alive=false; } if(alive) { px=Player.getX(); py=Player.getY(); pz=Player.getZ(); } } } function leaveGame() { ModPE.saveData("plx",px); ModPE.saveData("ply",py); ModPE.saveData("plz',pz); }perhaps?
Please give more details via PM.
If i helped you please press the
~MattdaveMatt