ModPE.setGamespeed()? Yes, works, but makes the hole game faster, including monsters .
To make just yourself faster, use:
function setVelX(ent,velocity);
function setVelY(ent,velocity);
function setVelZ(ent,velocity);
for ent, use:
-for yourself: Player.getEntity()
-for Mobs: Entity.getEntityTypeId(entity)
Note: entity is a number(integer), not a String! Each entity has it's own number, see them on the minecraft-wiki (creepers are 33, for example).
If you need another option for the third, ask me, I know one including modTick.[/pre]
Velocity is another english word for speed. If your question was, would you should put in, use an integer (number). I don't know what number is how fast, try it out. (It are three functions, one for the speed for each coordinate (X,Y,Z).)
First question, how do I set up the attackHook function so if the player is attacked by a hostile mob it activates?
Second, how do you change just the players speed?
Third, how do I make it so if the block under the player is say id 1 (stone) it would activate a hook function?
Sorry about all the questions, im new at modding
Thanks, and I got an answer for the third
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumModPE.setGamespeed()? Yes, works, but makes the hole game faster, including monsters
.
To make just yourself faster, use:
function setVelX(ent,velocity);function setVelY(ent,velocity);
function setVelZ(ent,velocity);
for ent, use:
-for yourself: Player.getEntity()
-for Mobs: Entity.getEntityTypeId(entity)
Note: entity is a number(integer), not a String! Each entity has it's own number, see them on the minecraft-wiki (creepers are 33, for example).
If you need another option for the third, ask me, I know one including modTick.[/pre]
Thanks, what is the velocity
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumVelocity is another english word for speed. If your question was, would you should put in, use an integer (number). I don't know what number is how fast, try it out. (It are three functions, one for the speed for each coordinate (X,Y,Z).)
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSorry that I say it a little bit late, but I thought the first with the attack-hook is possible?:
function attackHook(attacker, victim) {if (attacker == Player.getEntity()) {
//you can, you mustn't write something here
} else {
//your Code
}
}[/pre]
Thanks