[SOLVED] Check if entity variable is null

Started by RedWirePlatinum on

Topic category: Feature requests and ideas for MCreator

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Check if entity variable is null
Tue, 03/28/2023 - 00:25 (edited)

I think it would be helpful to check if an entity variable is null or not. There has been a couple occasions where if I try to define a specific entity while iterating through entities/players then attempting to do something with said entity, the game will crash because the entity isn't defined.

Edited by RedWirePlatinum on Tue, 03/28/2023 - 00:25
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wellllllll on second thought…
Tue, 03/28/2023 - 00:25

Wellllllll on second thought, using the "no entity" code block in the advanced tab does exactly what I want.. nevermind!