Is my procedure and trigger correct

Started by prozenitsu on

Topic category: Help with modding (Java Edition)

Last seen on 08:43, 7. Oct 2022
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)

 

----

Last seen on 08:43, 7. Oct 2022
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?

Last seen on 15:24, 24. Apr 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Potion ?
Thu, 11/04/2021 - 07:50

Potion ?

Last seen on 11:41, 31. Mar 2024
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.)

 

Last seen on 08:43, 7. Oct 2022
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

Last seen on 04:28, 26. Jan 2024
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)

Last seen on 08:43, 7. Oct 2022
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

Last seen on 08:43, 7. Oct 2022
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

Last seen on 08:43, 7. Oct 2022
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

--

Last seen on 04:28, 26. Jan 2024
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

Last seen on 08:43, 7. Oct 2022
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?

 

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes
Fri, 11/05/2021 - 01:20

yes

Last seen on 08:43, 7. Oct 2022
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

 

Last seen on 08:43, 7. Oct 2022
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?

Last seen on 04:28, 26. Jan 2024
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