I got this app called ModCraft Script Creator. But I have no idea how to use it!
It says you need to know about JavaScript. I don't even know what JavaScript is!!
I got this app called ModCraft Script Creator. But I have no idea how to use it!
It says you need to know about JavaScript. I don't even know what JavaScript is!!
PLEASE HELP.
HELP WILL BE APPRECIATED!!! :-)
If you want to learn JavaScript Rhino (Language used for ModPE scripts) I recommend looking into ModPE School.
this guide helped me alot im also new to javascript i knew what it was but i knew nothing about it and now i know how to make a mod that can be a cool looking block i even made a computer/tv block:)
its fairly easy once you take the time to understand it i found this video the most simple easy guide i could find it gives you all the basic steps
Programmers use programming language because it is easier to write
ModPE.showTipMessage("Hi!");
than
something out of 0 and 1 (a computer saves informations in 0 and 1 or in other words in on or off, and this in transistors)
but you only need to know how to use this programming language.
---
Learning to make ModPE Scripts is for beginners really easy, because you can instant test them with BlockLauncher to find errors and you don´t have to compile them (compiling makes out of a project of a program or Apk or whatever by creating an .exe or .apk-file (or other files, based on system and programming language) out of the project).
---
JavaScript is based on Java and is a programming language for Websites. And for ModPE-Scripts.
You create a Mod by using the functions (as shown in the Video luna09876 postet) and save this in a .js-file and import it with BlockLauncher. Ready!
---
How to find these functions:
Open BlockLauncher, go to settings-->nerdy stuff-->dump ModPE functions
Or look on this list of functions, it´s not complete but it helps you to understand them better:
But a ModPE-Script just out of those functions wouldn´t be good, because you can create items and blocks etc but you can´t interact with things in the game, like if the player attacks a mob.
Hooks are functions that are activated (called called (BlockLauncher calls this Hooks if something in the game happens)) if somthing happens.
---
Here´s an example for a hook used together with a function:
function attackHook(attacker, victim){
Player.addItemInventory(276,1,0);
}
If you would paste this in a .js-file and use it with BlockLauncher you would become a diamond sword whenever you attack a mob.
Lines in Mods that starts with
//
are comments and does nothing in the Mod. I write some comments, so you can understand better what I mean.
But what if you want this happen only if you attacked a specific mob, for example a spider?:
function attackHook(attacker, victim){
if(Entity.getEntityTypeId(victim)==35){ //if does somthing that is in the { } after the if()-condition if the things in the if are true, so if victim has the Entity-Id 35 (that´s the Id of the spider) the Mod calls the function Player.addItemInventory and gives the Player a diamond sword, for other mobs it does nothing because there´s nothing more after the if
Player.addItemInventory(276,1,0);
}
}
And if you want to give the Player a diamond sword if the Entity is a spider and do something other if not?:
function attackHook(attacker, victim){
if(Entity.getEntityTypeId(victim)==35){
Player.addItemInventory(276,1,0);
}else{
clientMessage("Not a spider!");
}
}
This is the normal if-else:
if(condition){
//do something
}else{
//do something other
}
The { } shows the Mod what is in the if and else, so you can
if(condition){
//do something
//do something
/...
}else{
//do something other
//...
}
make more lines with more functions.
This are just really basic things, and if you want to understand JavaScript better you should do what MattdaveMatt said.
You don´t need ModCraft to make Mods, you just need a text-editor (like DroidEdit). But ModCraft can be a help.
I got this app called ModCraft Script Creator. But I have no idea how to use it!
It says you need to know about JavaScript. I don't even know what JavaScript is!!
PLEASE HELP.
HELP WILL BE APPRECIATED!!! :-)
I have the same problem.
Rollback Post to RevisionRollBack
Hey what's going on guys? My name is TheEnderstar!
It says you need to know about JavaScript. I don't even know what JavaScript is!!
PLEASE HELP.
HELP WILL BE APPRECIATED!!! :-)
HOW TO MAKE COSTUM ITEM: ModPE.setItem(item id, "texture name", texture number, "name of item");
If u wanna learn more message me
If you want to learn JavaScript Rhino (Language used for ModPE scripts) I recommend looking into ModPE School.
Hope this helps!
~Matt
this guide helped me alot im also new to javascript i knew what it was but i knew nothing about it and now i know how to make a mod that can be a cool looking block i even made a computer/tv block:)
its fairly easy once you take the time to understand it i found this video the most simple easy guide i could find it gives you all the basic steps
i hope this helped:)
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumJavaScript is programming language.
Programmers use programming language because it is easier to write
ModPE.showTipMessage("Hi!");
than
something out of 0 and 1 (a computer saves informations in 0 and 1 or in other words in on or off, and this in transistors)
but you only need to know how to use this programming language.
---
Learning to make ModPE Scripts is for beginners really easy, because you can instant test them with BlockLauncher to find errors and you don´t have to compile them (compiling makes out of a project of a program or Apk or whatever by creating an .exe or .apk-file (or other files, based on system and programming language) out of the project).
---
JavaScript is based on Java and is a programming language for Websites. And for ModPE-Scripts.
You create a Mod by using the functions (as shown in the Video luna09876 postet) and save this in a .js-file and import it with BlockLauncher. Ready!
---
How to find these functions:
Open BlockLauncher, go to settings-->nerdy stuff-->dump ModPE functions
Or look on this list of functions, it´s not complete but it helps you to understand them better:
https://github.com/Connor4898/ModPE-Scripts/wiki/ModPE-Scripts-Functions-List
---
But a ModPE-Script just out of those functions wouldn´t be good, because you can create items and blocks etc but you can´t interact with things in the game, like if the player attacks a mob.
For this you need hooks.
Here´s a list of all hooks: https://github.com/Connor4898/ModPE-Docs/wiki/Hooks
Hooks are functions that are activated (called called (BlockLauncher calls this Hooks if something in the game happens)) if somthing happens.
---
Here´s an example for a hook used together with a function:
function attackHook(attacker, victim){
Player.addItemInventory(276,1,0);
}
If you would paste this in a .js-file and use it with BlockLauncher you would become a diamond sword whenever you attack a mob.
Lines in Mods that starts with
//
are comments and does nothing in the Mod. I write some comments, so you can understand better what I mean.
But what if you want this happen only if you attacked a specific mob, for example a spider?:
function attackHook(attacker, victim){
if(Entity.getEntityTypeId(victim)==35){ //if does somthing that is in the { } after the if()-condition if the things in the if are true, so if victim has the Entity-Id 35 (that´s the Id of the spider) the Mod calls the function Player.addItemInventory and gives the Player a diamond sword, for other mobs it does nothing because there´s nothing more after the if
Player.addItemInventory(276,1,0);
}
}
And if you want to give the Player a diamond sword if the Entity is a spider and do something other if not?:
function attackHook(attacker, victim){
if(Entity.getEntityTypeId(victim)==35){
Player.addItemInventory(276,1,0);
}else{
clientMessage("Not a spider!");
}
}
This is the normal if-else:
if(condition){
//do something
}else{
//do something other
}
The { } shows the Mod what is in the if and else, so you can
if(condition){
//do something
//do something
/...
}else{
//do something other
//...
}
make more lines with more functions.
This are just really basic things, and if you want to understand JavaScript better you should do what MattdaveMatt said.
You don´t need ModCraft to make Mods, you just need a text-editor (like DroidEdit). But ModCraft can be a help.
Could i have some help too im planning an amazing Dragonball Z mod
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSaying "help" is good - better would be to tell with what, what the problem is.
i need help making a custom png image then placing it in the opaque or meta
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou don´t need to do it like that anymore:
http://git.io/vkeK0
I have the same problem.
Hey what's going on guys? My name is TheEnderstar!
http://www.minecraftforum.net/members/TheEnderstar