[SOLVED] Check if entity variable is null

Started by RedWirePlatinum on

Topic category: Feature requests and ideas for MCreator

Active 1 day ago
Joined May 2022
Points:
794

User statistics:

  • Modifications: 1
  • Forum topics: 43
  • Wiki pages: 0
  • MCreator plugins: 2
  • Comments: 167
[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
Active 1 day ago
Joined May 2022
Points:
794

User statistics:

  • Modifications: 1
  • Forum topics: 43
  • Wiki pages: 0
  • MCreator plugins: 2
  • Comments: 167
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!

Active 1 month ago
Joined Sep 2015
Points:
819

User statistics:

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

Thanks!