(SOLVED) Cant use entity iterator in return number

Started by Samuelchr_ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(SOLVED) Cant use entity iterator in return number
Wed, 09/18/2024 - 16:16 (edited)

https://imgur.com/a/mq4VZKc

it just says "Entity iterator procedure block outside foreach statement"

I really need to be able to return a number from entity iterators so plz help me

Edited by Samuelchr_ on Wed, 09/18/2024 - 16:16
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So you want to return a…
Mon, 09/16/2024 - 14:55

So you want to return a number eg the number of entities? If so make a local varibale, on entity iterator if (not) entity iterator = entity null then set local varibale to local variable + 1. That will count all entities in the entity iterator area. After looking at your procedure I have no idea what your trying to do. What is calling the procedure, the triggers show what information they can output.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You cant target entity…
Mon, 09/16/2024 - 14:56

You cant target entity iterator without calling for multiple entities using the entity iterator procedure.

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you for your help
Wed, 09/18/2024 - 16:16

thank you for your help