The game starts up good but when i go to load a world the game crashes, any kind of help would be appreciated. I dont even get a crash log it just says java something has stopped working and to close the application. thanks
Simple!!There's two parts:
1:Getting UUID from arrows in the world
2:Testing their Velocity
First part:UUID of arrow
You will need an entityAddedHook(ent) to make it work,you also need an array too.
var arrow=[];
function entityAddedHook(ent){
if(Entity.getEntityTypeId(ent)==80){
arrow.push(ent);//putting that arrow to a watchlist kinda thingy XD
clientMessage("UUID:"+ent);//for checking
}
}
Second part:triggering function:simple enough,you can even copy it if you want
function modTick(){
for(var i=0;i<arrow.length;i++){
if(Entity.getVelX(arrow)==0&&Entity.getVelY(arrow)==0&&Entity.getVelZ(arrow)==0){//getting the velocity
explode(Entity.getX(arrow),Entity.getY(arrow),Entity.getZ(arrow),3);//change this to something else
Entity.remove(arrow);//here I use remove,you can either delete this line or keep it
}
}
if(arrow.length>10){//my phone sucks so I have it to 10,whenever you shoot 10 arrows,it reset this array
arrow=[];//clear array or game will lag
}
}
Now whenever you shoot an arrow,it explode!!
Works like charm!
wait a minute,what about skele?
There is a way to avoid it but you do it yourself ; )
Btw,if you mean an item arrow,then bummer,you know how to do it,its upstairs
Says "cannot read property "length" from undefined"
Hi. I need help. Im trying to make a gun that has explosive bullets. It works in all but I just dont know how to set an explosion when an arrow hits the ground. Your help would be very appreciated. Thanks
Hi. I was just wondering how you would trigger a function when an arrow hits the ground. Your help would be very appreciated and I will include you in my mod's credits. Thank you
Hi. I need help please. I just want to know how to spawn arrows shooting in the direction youre looking in. (Yes I know how to spawn arrows, just not in the direction youre looking in) im trying to make a mod that adds guns and stuff. So your help would be very appreciated
0
The game starts up good but when i go to load a world the game crashes, any kind of help would be appreciated. I dont even get a crash log it just says java something has stopped working and to close the application. thanks
0
Hello. I was just wondering if there was any way of setting a fuse time for tnt when you spawn them. Thank you
0
Says "cannot read property "length" from undefined"
0
:/
0
Hi. I need help. Im trying to make a gun that has explosive bullets. It works in all but I just dont know how to set an explosion when an arrow hits the ground. Your help would be very appreciated. Thanks
0
Hi. I was just wondering how you would trigger a function when an arrow hits the ground. Your help would be very appreciated and I will include you in my mod's credits. Thank you
0
Thank you so much
0
Hi. I need help please. I just want to know how to spawn arrows shooting in the direction youre looking in. (Yes I know how to spawn arrows, just not in the direction youre looking in) im trying to make a mod that adds guns and stuff. So your help would be very appreciated