Infinate lightning and explotion spawn

Started by BobEsBeans on

Topic category: Help with Minecraft modding (Java Edition)

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Infinate lightning and explotion spawn

Okay so I'm creating a mod that is supposed to spawn lightning and an explosion at half health once, and then another lightning strike every minute. Instead what I get it infinite lightning an explosions that look like lightning tornados, (could be a cool weather addon), but I've been trying to fix this literally all day with no luck, and I haven't found a solution in any of the forums I've found. Anyone have suggestions or know fixes?

 

Here are some images of code and results

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
I've tried having the repeat…
Mon, 07/29/2024 - 04:34

I've tried having the repeat at 1 and it doesn't do anything so i tried using the summon command with a a few of them to see if i got the results i wanted but it was the same as well.

Active 10 hours ago
Joined Apr 2024
Points:
357

User statistics:

  • Modifications: 7
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 443
heres: https://imgur.com…
Mon, 07/29/2024 - 13:20

heres: https://imgur.com/YOLj9Xd 

set every variable to "player_lifetime" 

also, it spawns lighting every 10 seconds, to make it wait 1 minute replace 200 with 1200 in the last two if's

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Thank you so much I'll try…
Mon, 07/29/2024 - 21:25

Thank you so much I'll try this right now!

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
do you have a plugin for the…
Mon, 07/29/2024 - 22:11

do you have a plugin for the global logic? I cant fond it anywhere and idk if its just not there or if im being dumb and missing it

Active 10 hours ago
Joined Apr 2024
Points:
357

User statistics:

  • Modifications: 7
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 443
I'm not using any plugin,…
Mon, 07/29/2024 - 23:10

I'm not using any plugin, what is exactly that you don't find? every global variable block can be found in the custom variables tab after you create them 

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Sorry I'm still new at this,…
Mon, 07/29/2024 - 23:56

Sorry I'm still new at this, how do you make one then? I only see local variables and when i make one theres no option to make it a global variable

Active 10 hours ago
Joined Apr 2024
Points:
357

User statistics:

  • Modifications: 7
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 443
click on the "variables" tab…
Tue, 07/30/2024 - 00:30

click on the "variables" tab: https://imgur.com/4m6ij3x 

 

then you'll be able to create global variables, make sure to set the type to "logic", the scope to "player_lifetime" and the initial value to false  except for the variable that I called "ticks" that one needs to be set to type "number", scope "player_lifetime" and initial value 0

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Okay thank you so much, I'll…
Tue, 07/30/2024 - 03:06

Okay thank you so much, I'll try that in a little bit. Thank you for being patient with me also

Active 10 hours ago
Joined Apr 2024
Points:
357

User statistics:

  • Modifications: 7
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 443
You're welcome 
Tue, 07/30/2024 - 11:14

You're welcome 

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
hey so I finally had time to…
Wed, 07/31/2024 - 19:36

hey so I finally had time to test it and it works in single player and lan worlds, but the repeated lightning strikes don't work on a server, do you have an idea of what would cause that? 

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
also I have just realized…
Wed, 07/31/2024 - 20:15

also I have just realized while testing damage that it spawns like 8 lightning bolts instead of 1

Active 10 hours ago
Joined Apr 2024
Points:
357

User statistics:

  • Modifications: 7
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 443
I don't know what causes the…
Wed, 07/31/2024 - 20:23

I don't know what causes the server thing, but I tested that procedure before sending the screenshot (and even before sending this message) and it only spawns one lighting bolt

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
what procedure did you have…
Wed, 07/31/2024 - 20:26

what procedure did you have it on cause i tested it on right click and it spawns one, but when i have it on tick or hurt it spawns 8 more

Active 9 months ago
Joined Jul 2024
Points:
54

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
The server thing I figure…
Wed, 07/31/2024 - 20:40

The server thing I figure out by having it on the tick procedure but it still spawns so many lightning bolts...