Started by
prozenitsu
on
Topic category: Help with Minecraft modding (Java Edition)
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)
just now i run client , it did wait for 5 second but later it keep summon many lihtning what wrong?
Potion ?
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.)
how? can u send a screenshot if can really thank you
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)
thanks but can u do a screen shot , if can i really really thanks you
wait i found it
ok did it but the lightning did not strike
well that should work? are you sure you put it on the correct trigger? also why do you have so many variables lol
i put on
effect active tick
is it correct?
yes
but it did not strike
know how to fix it?
maybe change the Variable to a Global_Player_Lifetime one