How might I make a sorta event that delays with procedures?

Started by Lionmeow on

Topic category: Help with MCreator software

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How might I make a sorta event that delays with procedures?
Fri, 08/02/2019 - 04:46 (edited)

I've been attempting for a bit now to make a block that does something when it's placed. So let's say that when the block is placed into the world, every five seconds, for fourty-five seconds, a zombie spawns around the block? How might I do the 'every five seconds for fourty-five seconds' thingy?

Edited by Lionmeow on Fri, 08/02/2019 - 04:46
Last seen on 17:12, 27. Mar 2020
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When you make the block,…
Fri, 08/02/2019 - 06:32

When you make the block, below the material of the block is the tick rate. 20 ticks = 1 second, just add it up to whatever time you want, then add a procedure to tick update, not random tick update event. Hope this helps :)

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm... while this does help…
Fri, 08/02/2019 - 07:12

Hmm... while this does help quite a bit, it does everything at once. I suppose I should have clarified that in the original post. What if I want to spawn a slime to the side of a block, and then a second later place a block above the block?

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately, from my many…
Sun, 08/04/2019 - 03:42

Unfortunately, from my many viewings of that video in the past, I have concluded it will not work for my situation. What I'm attempting to figure out is making many delays within the block. My idea is when said block is placed into the world, it places a couple blocks, waits a second, places more blocks, waits a second, spawns a mob, waits a second, etc., culminating in replacing the original block after 45 seconds.

You can easily do this and…
Sun, 08/04/2019 - 09:37

You can easily do this and there are tutorials for this on forums. Just count to one value, do something, then count to next value, etc.

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I honestly don't know what I…
Sun, 08/04/2019 - 10:40

I honestly don't know what I'm doing wrong. That was actually my first thought when first faced with this issue, and before I made this post, I looked around and found many posts saying similar things. I did my own idea too. Everything I try results in one of three things. Either it is instant rather than delaying, doesn't work at all, or just glitches out. Here's my code, I've tried on both tickupdate and randomtickupdate events, along with modifying the tick update speed, however nothing seems to be working.Snippet

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Did you call this procedure…
Sun, 08/04/2019 - 17:36

Did you call this procedure from the block update event?

Also you probably should have a something that stops the tickvar from continuing infinitely.

 

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm almost sure block update…
Sun, 08/04/2019 - 21:05

I'm almost sure block update event is Update Tick, is it not? If it is, then yes, I have called it from that event. About infinitely continuing with tickvar, won't it stop as the block updating it is being replaced? 

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well here's an update: I…
Sun, 08/04/2019 - 21:26

Well here's an update: I revamped the code, however as logical as it is, no delay occurs. I placed it in the 'When block placed into the world' event. Any ideas why this isn't working?AAAAAAA

You can't use local variable…
Mon, 08/05/2019 - 11:29

You can't use local variable for delays as local is reset on each execution of the procedure, this is what local means.

Use one of the global variables types or NBT variables. You have examples on how to do this on the website, just search a bit.

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Huh... I attempted the fixes…
Tue, 08/06/2019 - 04:20

Huh... I attempted the fixes, however it still will not work. It just stays, without placing the blocks.still doesn't like to work

Last seen on 03:13, 25. Sep 2019
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wait a second-- it's that…
Tue, 08/06/2019 - 04:24

Wait a second-- it's that glitch I experienced before. When I start the event, the entire world freezes. You can still move around and modify blocks, however mobs are frozen, and attempting to click on anything doesn't yield results. You can't reload or exit the game, as it freezes up as soon as you try to do so. Note that when I tried replacing the active core with the inactive one during the freeze up, then right clicked, while the block did change, nothing else happened.

Last seen on 17:18, 11. Feb 2020
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
lol same.but for me,is when…
Tue, 08/06/2019 - 17:48

lol same.but for me,is when i make change player to dimension id.

This can happen if one of…
Tue, 08/06/2019 - 20:07

This can happen if one of your procedures gets called too often or you make a procedure that somehow triggers itself.