How do I get the reason an entity spawned?

Started by willk55 on Sat, 09/26/2020 - 15:51

Topic category: Help with MCreator software

Last seen on 21:50, 22. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I get the reason an entity spawned?
Sat, 09/26/2020 - 15:51

I'm trying to make it so that when an armor stand is spawned by a procedure, some of its data gets changed. I also want it so that when the armor stand is placed by a player it isn't affected by the later code. I think the "reason" dependency of the "Entity Spawns" trigger holds the answer, but I can't find any way to get the information stored in it. 

https://drive.google.com/file/d/1vo9Hm4EOGVqKJQs8gXgOQ7-BeHZDf2kq/view?…

(Also, if there's a better way to share pictures than using google drive I would be glad to be told)

Last seen on 21:50, 22. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I discovered that in the…
Sun, 09/27/2020 - 17:03

I discovered that in the advanced section there are blocks called

Logic/Number/Text dependency: "dependency name"

However, when I put "reason" into any of them, it stops the procedure from doing anything at all. I looked into the generated code and found this:

if (dependencies.get("reason") == null) {
            System.err.println("Failed to load dependency reason for procedure SpawnItemOnGround!");
            return;
}

This code stops the procedure from running if it can't find the requested dependency. For some reason, the code can't find the dependency, "reason", so it stops the procedure when I try to use it. I don't know if this is a bug, or if I'm doing something wrong. Any help would be greatly appreciated!

Last seen on 21:50, 22. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I found a different way of…
Sat, 10/03/2020 - 15:20

I found a different way of doing what I wanted that doesn't need to use the reason the entity spawned. However, it might be helpful later on, so any solutions would still be helpful.

Last seen on 02:48, 21. Oct 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
There is thig called…
Wed, 10/21/2020 - 02:09

There is thig called conditions. If do return true return false. If a condition ends with return that means it is a condition and can be added to entities AI. Also you can create variables at upload enity model thing. You can set variables true false if or numbers than it will work.