How do I add an Achievement for killing a specific mob ?

Started by JojoMichelDu59 on Thu, 08/01/2019 - 23:29

Topic category: Help with MCreator modding

Last seen on 12:58, 3. Aug 2019
Joined Mar 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How do I add an Achievement for killing a specific mob ?
Thu, 08/01/2019 - 23:29

Hello, I want to create a mod that adds an Achievement called "Aw Man" when I kill a Creeper. How do I that ? (I am really bad at procedure-making, so explain it simply)

Last seen on 02:48, 22. Sep 2019
Joined Jul 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Here is how: (You have to…
Mon, 08/05/2019 - 19:50

Here is how: (You have to use a custom mob, sadly)

1.Make a mob

2.Add an event for when it's killed to give you an advancement (you need create the actual advancement first)

 Hope this helped.

Last seen on 20:39, 10. Aug 2019
Joined Mar 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Alternatively, you could do…
Wed, 08/07/2019 - 12:12

Alternatively, you could do it by using two procedures (with two separate external triggers) and a global variable. This would allow you to use the vanilla creeper entity. However, since you would be using a variable, this would only work in single-player.


First, you would create a global logic variable (name it whatever you like), then create the achievement.


For the first procedure, select Entity Dies as the external trigger. The actual blocks you need will look like this:

If: Is current entity subtype of EntityCreeper = true

Do: Set Global: (Name Of Variable) to true


For the second procedure, select On Player Tick Update as the external trigger. The actual blocks you need will look like this:

If: Get Global: (iName of Variable) = true and has provided entity completed achievement: CUSTOM: (achievement name) = false

Do: Add achievement to provided entityPlayer: CUSTOM: (achievement name)


If this confused you, check out here: https://mcreator.net/node/52002

Last seen on 05:54, 23. Sep 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Yes, but this way there…
Thu, 08/08/2019 - 17:05

Yes, but this way there would be a lot of lag and the player would get the advancement even if the mob died naturally or was killed by someone else :/

I think they should add a "on mob killed by player trigger"

Last seen on 20:39, 10. Aug 2019
Joined Mar 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Agreed. It would be really…
Thu, 08/08/2019 - 17:12

Agreed. It would be really useful,they would have to implement a way to differentiate between the two entities though.