[SOLVED] Check if entity variable is null

Started by RedWirePlatinum on

Topic category: Feature requests and ideas for MCreator

Last seen on 08:56, 19. Apr 2024
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
Last seen on 08:56, 19. Apr 2024
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!

Last seen on 04:44, 31. Mar 2024
Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks!
Tue, 07/11/2023 - 20:19

Thanks!