Is my procedure and trigger correct

Started by prozenitsu on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is my procedure and trigger correct

Is my procedure correct and the trigger correct

(i am making a effect call lightning , it will struck lightning to you and wait for 5 seconds and stuck again until effect worns out)

 

----

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just now i run client , it…
Thu, 11/04/2021 - 07:17

just now i run client , it did wait for 5 second but later it keep summon many lihtning what wrong?

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The procedure is executed…
Thu, 11/04/2021 - 09:21

The procedure is executed every tick, so the timer is starting a bunch of times, and so the effect kinda "stacks" because its server-sided.

Try to replace the tick procedure with a custom made one. (So make a local variable, and add +1 each tick, then if it equals 200 reset it to 0 and strike the lightning.)

 

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how?  can u send a…
Thu, 11/04/2021 - 10:49

how?  can u send a screenshot if can really thank you

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just outside of the…
Thu, 11/04/2021 - 16:08

just outside of the procedure, add a block procedure that removes the potion effect. if that's what you want.

or like Hazzah said, variables, create a Local Variable (Number) on the right side of the blocky editor, name it whatever, then remove the Wait blocks and remove the Repeat blocks too

then put this

set Local:'name' to get Local:'name' + 1

then put this

if get Local:'name' = 200

  do strike lightning

        set Local:'name' to 0

        strike lightning (I put it 2 times so it strikes twice)

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks but can u do a screen…
Thu, 11/04/2021 - 23:39

thanks but can u do a screen shot , if can i really really thanks you

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
wait i found it
Thu, 11/04/2021 - 23:57

wait i found it

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok did it but the lightning…
Fri, 11/05/2021 - 00:14

ok did it but the lightning did not strike

--

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well that should work? are…
Fri, 11/05/2021 - 00:46

well that should work? are you sure you put it on the correct trigger? also why do you have so many variables lol

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i put on effect active tick…
Fri, 11/05/2021 - 00:52

i put on

effect active tick

is it correct?

 

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but it did not strike  
Fri, 11/05/2021 - 05:39

but it did not strike

 

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
know how to fix it?
Fri, 11/05/2021 - 09:17

know how to fix it?

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe change the Variable to…
Fri, 11/05/2021 - 14:35

maybe change the Variable to a Global_Player_Lifetime one