How to/Is it possible to; To have a 50% chance to open a portal with one time use Trigger item

Started by Phoenix_Wolf on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to/Is it possible to; To have a 50% chance to open a portal with one time use Trigger item
Wed, 05/03/2023 - 18:25 (edited)

Im making 2 new dimension But I want there to be a 50/50 chance of either or to open. Lets say dimension X and dimension Y are both by portals and I want 50% of the time to be X and 50% chance to be Y to possibly appear in the same portal. (This is an extra help needed, no need to answer this one since ill try fooling around with it to discover how but feel free to answer. Also Trying to figure out to get given an Item 20-10% of the times after sleeping. So You Sleep, then you wake up and get given an Item 20-10% of the times)

Edited by Phoenix_Wolf on Wed, 05/03/2023 - 18:25
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have solution of the…
Sat, 06/10/2023 - 10:20

I have solution of the second one:

-NEW PRODECURE

-change global trigger to "WHEN PLAYER WAKES UP"

-IF random integer 1-20 included < 4

DO add 1 (your item) to EVENT/TARGET ENTITY iventory

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry for bad english and…
Sat, 06/10/2023 - 10:21

sorry for bad english and that i cant send the picture

 

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
change 1-10 to 1-20  
Sat, 06/10/2023 - 10:50

change 1-10 to 1-20

 

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't have the best…
Mon, 06/12/2023 - 12:50

I don't have the best solution for the first one, maybe someone else does.
You can add a new transition dimension. Go to Triggers and select "When player enters dimension". Add the following code:

https://imgur.com/a/9OpI4vb


I think it would be a bit laggy because the game has to load two dimensions. But I think it should work.