Variable and dependency issue

Started by Dollyfroggy on

Topic category: Help with modding (Java Edition)

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Variable and dependency issue

It says 'Set variable block for player variable is missing entity input' but I have the dependency 'Event/target entity' and it works everywhere else. How can I fix this? Code here.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe your trigger doesn't…
Sat, 10/30/2021 - 18:23

maybe your trigger doesn't support event target entity, also who uses Global Triggers for itemstacks??

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It appears to support it, so…
Sat, 10/30/2021 - 23:10

It appears to support it, so I'm not sure why there's an issue. What are Global Triggers and what's the alternative?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hard to explain, but Global…
Sat, 10/30/2021 - 23:44

hard to explain, but Global Triggers are triggers that are not local, for example, supposing you have a lightning wand that strikes lightning when right clicked, you could 

1. make the procedure on global trigger BUT you will have to check for the item in main hand

or

2. on your item editor put the procedure on local Triggers and you do not need to get item in main hand.

indeed really hard to explain, but you should be able to figure it out from here.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and an alternative would…
Sat, 10/30/2021 - 23:45

and an alternative would depend on what triggers your procedure, if it's a custom item or a custom entity or custom block or Anything Custom, the  put the procedure on the local triggers it provides

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wouldn't this be a local…
Sun, 10/31/2021 - 00:22

Wouldn't this be a local trigger since it says 'No additional trigger' and it's triggered by changing something in a GUI? I attached the next line of my code; the error only complains about the first line but not the second despite them both using the 'entity' dependency.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that could be either a local…
Sun, 10/31/2021 - 00:27

that could be either a local or global trigger, if the trigger supports entity ofc, but can't you do this without variables? why do you need them on this case?

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have some other procedures…
Sun, 10/31/2021 - 00:31

I have some other procedures that could be triggered when the GUI is closed (e.g. when entity is healed) and I need to check which item is in the GUI. There's no block for checking an item in a GUI besides the one that is currently open to my knowledge, so I tried to set it to a variable so I could check the variable.

 

Basis of the mod: There's a GUI where you put items in and different items give you different power-ups.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I see. But then do this with…
Sun, 10/31/2021 - 01:41

I see. But then do this with Player Lifetime Variables, when player inserts item set VARIABLE "power-up" to = # or true/false

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I use items for that?…
Sun, 10/31/2021 - 01:46

Can I use items for that? There are multiple items with different power-ups and I don't want to make a variable for each.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes, make different variables
Sun, 10/31/2021 - 02:13

yes, make different variables

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh sorry lol, just make…
Sun, 10/31/2021 - 02:14

oh sorry lol, just make multiple variables for multiple items

Last seen on 03:55, 21. May 2022
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, I'll do that. Thank…
Sun, 10/31/2021 - 02:22

Alright, I'll do that. Thank you!