delay doesn't work with repeat loop

Started by Averagemcreato… on Mon, 11/07/2022 - 19:30

Topic category: Help with modding (Java Edition)

Last seen on 16:33, 24. Jan 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
delay doesn't work with repeat loop
Mon, 11/07/2022 - 19:30 (edited)

I am trying to create a firearm that will quickly fire 9 rounds with a 6 ticks delay between them. but when I try it, it fires all of them at once.

 

the blocks I am using:

 

event trigger

repeat 9 times do

(

wait 6 ticks then on server side do [

]

shoot arrow

)

Edited by Averagemcreatorenjoyer on Mon, 11/07/2022 - 19:30
Last seen on 16:33, 24. Jan 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I have also tried putting…
Mon, 11/07/2022 - 19:30

I have also tried putting the shoot arrow in the wait 6 ticks block, and it didn't work.

Wait does not this way. Wait…
Tue, 11/08/2022 - 16:08

Wait does not this way. Wait will not stop current from running but run blocks inside wait block delayed

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei

Last seen on 01:57, 29. Jan 2023
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
the repeat block does not…
Tue, 11/08/2022 - 22:30

the repeat block does not care about whether or not the code it executes has finished executing before repeating it again. Basically, it triggers all your wait blocks at once.