Can Somebody help me with mob actions? [Unsolved]

Started by LittleMcMiner on

Topic category: Help with modding (Java Edition)

Last seen on 04:50, 11. Dec 2016
Joined Nov 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can Somebody help me with mob actions? [Unsolved]
Tue, 11/08/2016 - 04:14 (edited)

Hi, I have a system where if you right click on a custom mob I made, it opens a GUI, and when you click done, it sets a variable to true.

 

I need to make it so when that variable becomes true then the mob will follow the player everywhere he goes. However, I'm not quite sure how I could accomplish that. Any ideas?

 

Also, it is possible I could have a nametag above him that stays there even when you are not looking at him?

Edited by LittleMcMiner on Tue, 11/08/2016 - 04:14
Last seen on 19:01, 30. May 2022
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm, this is interesting
Mon, 11/07/2016 - 20:32

Hmm, this is interesting concept. I believe i have a solution that may work (untested). It involves creating two versions of mob and using the gui button events and stacked events.

Last seen on 04:50, 11. Dec 2016
Joined Nov 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Hmm, this is interesting
Mon, 11/07/2016 - 20:58

@#1 Could you please tell me step-by-step how to do that? It's okay if it doesn't work after we try it.

 

Also, when I click the button in my GUI, how do i make it close the GUI? When I click it, nothing happens to the GUI.

 

Also, When you type in the text box in my GUI, and you type an "e" it closes the GUI. How to fix that?

Last seen on 19:01, 30. May 2022
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:Hmm, this is interesting
Mon, 11/07/2016 - 21:36

1. Create two mobs that look alike, the first mob make normal (this is the one that will have the GUI attached) the second mob, use the same texture or whatever, but add the task AI (follow player)
2. Now go to the GUI and make a button, find "stack event" and choose it, click deal damage to mob(enough damage to kill mob), then add another stack event that spawns in Mob number 2.

Mob #2 has the AI to follow you, so it should.
Not sure if it will work, but can try it.

I dont think there is way to close the GUI except by clicking "esc" button on keyboard.

I am not sure why pressing "e" closes the GUI, sorry.

Last seen on 22:22, 6. May 2023
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't think there is a
Mon, 11/07/2016 - 22:41

I don't think there is a "Follow player" AI setting?

There is an follow item held but... 

Last seen on 04:50, 11. Dec 2016
Joined Nov 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The problem with that is that
Tue, 11/08/2016 - 01:59

The problem with that is that with 2 mobs, I would be forced to have 2 different spawn eggs, and that would confuse people. However, the "Stack events" option sounds interesting. Can you please explain to me how to use it?

Last seen on 19:01, 30. May 2022
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make it so the second mob is
Tue, 11/08/2016 - 17:24

Make it so the second mob is unatainable in survival mode.

Stack events: using this allows you to play different events in a specific time.

Example: stack event, add event that checks for a bronze coin in your inventory (if true) then a second event will happen (remove coin from inv) then a 3rd event will happen (add 5 exp bottles to your inventory)

Last seen on 04:50, 11. Dec 2016
Joined Nov 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Make it so the second mob is
Thu, 11/10/2016 - 23:23

@#5 Sorry I've been gone for a while now. That's a good idea, but even if the mob is unatainable in survival mode, it will still be attainable in creative mode. What I'm worried about is picking the wrong spawn egg when I open the creative inventory tab.

 

Do you know how you can can make a broadcast that another element of the mod can receive?

Last seen on 19:01, 30. May 2022
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:Make it so the second mob is
Fri, 11/11/2016 - 00:04

@LittleMcMiner

You can name each egg differently, like the untamed mob will be called "CrazyHorse" and the Tamed version will be called "CrazyHorse (T)" meaning t=Tamed.

Also can you give an example for the second question? I do not understand. Thanks.