Making triggers for gui opening

Started by Mrinal Sood on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 05:33, 15. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making triggers for gui opening
Fri, 06/14/2024 - 15:13 (edited)

I have this issue with the procedure block Convert registry name __ to item or AIR if conversion fails.

So my thought process was like this that I wanted to set all slots of my gui with some item whose stackable size is 1

so here is the code

Event Trigger

Set number Local:i to 0
while Get number Local:i < 20
do	Set 1 Convert registry name create text with "painter:pattern_" Get number local:i + 1 to item or AIR if conversion fails in slot Get number local:i of the currently open GUI of Event/Target Entity
	Set number local:i to: Get number local:i + 1
	
I have no idea on how to deal with this because algorithmically it looks correct but it does not do anything in the gui. also I have put this procedure in the while GUI is open tick section. so it should remain till the time the GUI is open. I dont know if the Convert procedure block is working or not. I also have registered all the pattern_i blocks where is i is iterating(0 - 20 slots)

Please help
Edited by Mrinal Sood on Fri, 06/14/2024 - 15:13
Last seen on 05:33, 15. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have no idea on how to…
Fri, 06/14/2024 - 14:01

I have no idea on how to deal with this because algorithmically it looks correct but it does not do anything in the gui. also I have put this procedure in the while GUI is open tick section. so it should remain till the time the GUI is open. I dont know if the Convert procedure block is working or not. I also have registered all the pattern_i blocks where is i is iterating(0 - 20 slots)

 

Please help