Start mob spawning when...?

Started by Raoul1808 on Mon, 03/18/2019 - 20:03

Topic category: Advanced modding

Last seen on 17:26, 20. Mar 2019
Joined Nov 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Start mob spawning when...?
Mon, 03/18/2019 - 20:03

Hi, as the title says, I would a specific mob to appear when the player gets an item. I know it involves events and variables, but how do I create some kind of variable that communicates with the mob to says "You spawn in overworld when player gets this item"?

 

I'm using version 1.8.2 of MCreator.

Last seen on 13:02, 21. Apr 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
To do this, you will need to…
Tue, 03/19/2019 - 11:56

To do this, you will need to use global event trigger on player tick update, check for the item in inventory and if it has it, spawn entity.

Last seen on 17:26, 20. Mar 2019
Joined Nov 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Uh... I think I got it but…
Wed, 03/20/2019 - 07:13

Uh... I think I got it but to tell it to "start spawning entity", I don't know how to do it... Maybe I have to disable entity spawning by default, but after that, how can I re-enable it?

Last seen on 09:21, 5. Apr 2019
Joined Dec 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I think I understand what…
Wed, 03/20/2019 - 08:22

I think I understand what you're saying and I don't think this is actually possible without using code.

Last seen on 14:43, 21. Apr 2019
Joined May 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
If you mean to make the mob…
Wed, 03/20/2019 - 15:24

If you mean to make the mob spawning to start when player beats a boss or have an item, You mean the mobs don't spawn before getting the item, and after having the item, they spawn like normal mobs

 

Wellll i think thats impossible

Last seen on 13:38, 21. Apr 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You will be able to do this…
Wed, 03/20/2019 - 15:53

You will be able to do this in Mcreator 1.8.3.

Just make a boolean world variable, make your mob, then add this procedure to "on mob tick rate" trigger:

If (variable = false)

teleport entity at x, - 1, z

 

This way, when the mob spawns, it will automatically be teleported at y=-1,so it will fall in the void without leaving drops.

 

Of course, you should also add a procedure that turns the variable true

Last seen on 13:02, 21. Apr 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
Raol, this is a nice idea,…
Wed, 03/20/2019 - 18:56

Raol, this is a nice idea, although kinda hacky :D

Last seen on 13:38, 21. Apr 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Yes XD Anyway, I forgot that…
Thu, 03/21/2019 - 13:12

Yes XD

Anyway, I forgot that the procedure should also check if the entity's y coordinate is > than - 1. Otherwise the mobs will remain stuck to y=-1 and cause lag