So, I stumbled upon one of arjay07's YouTube javascript tutorials. His video helped me make a custom weapon.
My question is how can I edit the appearance of my sword? Is there a way to do it using a code or can I use the uk.io app to create a texture? If I use the uk.io app how would I implement my texture straight into my current script?
Plz and thank you for any help. For now I'm just toying around with it. FYI it's for personal use...I may never make a full on mod. Not sure I got the time too lol.
So, I stumbled upon one of arjay07's YouTube javascript tutorials. His video helped me make a custom weapon.
My question is how can I edit the appearance of my sword? Is there a way to do it using a code or can I use the uk.io app to create a texture? If I use the uk.io app how would I implement my texture straight into my current script?
Plz and thank you for any help. For now I'm just toying around with it. FYI it's for personal use...I may never make a full on mod. Not sure I got the time too lol.
Texture: https://github.com/zhuowei/MCPELauncher/wiki/Texture-packs
if you want to edit the appearence of your sword you can put something in a hook:
function attackHook(attacker, victim){
if(attacker==getPlayerEnt()){ //if the attacker is the Player
if(Player.getSelectedSlotId()==ID){ //if the Item the Player holds is your custom sword (change "ID"to the ID of your sword)
Entity.setFireTicks(victim, 80); //sets the attacked entity on fire for 4 seconds (80 ticks=4 seconds)
}
}
}
This is just a simple example, you can edit it to make the sword like you want it.
You can find all hooks and functions etc. here: BockLauncher-->Settings-->Nerdy Stuff-->Dump ModPE Script functions
useful links:
https://github.com/Connor4898/ModPE-Docs/wiki
https://github.com/Connor4898/ModPE-Scripts/wiki/Basic-JS-and-ModPE-Tutorials
If you have no idea how JavaScript works you should google basic things about Java(Script):
-if-else-statements
-functions
-variables
Thank you that helped alot. I'll Def give that a shot.