Infinate lightning and explotion spawn

Started by BobEsBeans on

Topic category: Help with modding (Java Edition)

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 23:42, 8. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

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

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

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 23:42, 8. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 23:42, 8. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 23:42, 8. Sep 2024
Joined Apr 2024
Points:

User statistics:

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

You're welcome 

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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? 

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 23:42, 8. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 22:17, 2. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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...