Lightining Sword

Started by NaviBlu on Tue, 09/29/2020 - 18:30

Topic category: Help with modding (Java Edition)

Last seen on 12:09, 6. Oct 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Lightining Sword
Tue, 09/29/2020 - 18:30

So I made a sword and my idea for it was that when you right click it lightning will spawn where you are looking (crosshair) but haven't figured that out, if possible I also wanted to make a timer for the prompt which only allows you to do that every so often. Is this possible or is it just a waste of my time because I've looked through multiple tutorials and haven't found anything that can help me.

Last seen on 06:39, 31. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
try this: add a procedure to…
Wed, 09/30/2020 - 08:35

try this:

add a procedure to the sword's "when right-clicked in air" trigger.

now, add the "strike lightning at [x][y][z]" code block, and change the [x][y][z] variables to "block position with raytrace distance x/y/z" (or similarly named). there should be 3 variations for x, y, and z. for example, if you want the sword to strike lightning 6 blocks away from you, and at the position you're looking at, change the values of the "raytrace distance" code block arguments to 6.

the cooldown is the simplest part, actually. just go to itemstack procedures, then select "cooldown [provided itemstack] for [x] ticks" where x is the duration of cooldown in Minecraft ticks.

 

hope this helps. if you don't really understand, i can send screenshots as well

Last seen on 12:09, 6. Oct 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Screenshot would be very…
Wed, 09/30/2020 - 19:30

Screenshot would be very helpful because i am still getting used to making procedures so you could that would be amazing

Last seen on 06:39, 31. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
for now, i don't have access…
Wed, 09/30/2020 - 19:43

for now, i don't have access to my PC yet :/

but i can confirm that procedure works as i tested it yesterday and everything went well 😌

you might have to wait 5-6 hours first (i know that's a bit long but bear with me please) until i can send u either the screenshot or the procedure template.

 

Last seen on 12:09, 6. Oct 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
totally fine with that,…
Wed, 09/30/2020 - 20:00

totally fine with that, thank you so much

Last seen on 06:39, 31. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
alright, here it is: you…
Thu, 10/01/2020 - 01:49

alright, here it is:

Strike lightning at: [look pos X of entity, raytrace dist. 6] [look pos Y of entity, raytrace dist. 6] [look pos Z of entity, raytrace dist. 6]

you can change the numbers to any value you want. for example, this one strikes lightning about 6 blocks away from the player, so if u want it to be 9 blocks away for example, change all '6' values to '9'.

Last seen on 12:09, 6. Oct 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you, I just have one…
Fri, 10/02/2020 - 22:20

Thank you, I just have one more question, how did you do the dark blue blocks? I cannot find them

 

Last seen on 12:09, 6. Oct 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
nevermind, i found it
Fri, 10/02/2020 - 22:27

nevermind, i found it

Last seen on 06:39, 31. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
you're welcome :)
Fri, 10/02/2020 - 22:52

you're welcome :)