How to launch living entities

Started by Kvngsavage118 on

Topic category: Help with modding (Java Edition)

Last seen on 15:36, 27. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to launch living entities

I need help with a procedure that would launch a custom entity in the same direction I am looking.

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use this code, you may have…
Wed, 09/06/2023 - 01:57

Use this code, you may have to change around source entity and event/target entity depending on how you have your procedure set up.""

Last seen on 15:36, 27. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It only fires to negative Z…
Thu, 09/07/2023 - 02:28

It only fires to negative Z when I use this procedure.  

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What trigger do you have the…
Thu, 09/07/2023 - 08:51

What trigger do you have the procedure in? And could you take a screenshot of the code you put in it?

Last seen on 15:36, 27. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have it in the "On entity…
Fri, 09/08/2023 - 01:31

I have it in the "On entity tick update" section and here's the link https://imgur.com/wP8AYMV

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, I see the issue. You…
Sat, 09/09/2023 - 04:34

Okay, I see the issue. You have event/target entity as the entity type for the get look angle vector values. Those need to be referencing the player, but also you’ll probably need to put that whole block in a different trigger, because if it’s in an update tick it will send it flying in the direction you’re facing 20 times per second. I’d suggest you put it in a global procedure or an event that is not so often or is controlled, like if the entity is right clicked. With that example, you’d need to put ‘source entity’ into the get look angle vector blocks instead of event/target entity.

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh and another reason you…
Sat, 09/09/2023 - 04:35

Oh and another reason you need to change which trigger you’re using is because source entity is not an available dependency inside the update tick procedure.

Last seen on 15:36, 27. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So how would I go about…
Sat, 09/09/2023 - 17:27

So how would I go about doing that?  Is there any way you can show me an example?

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well the example I have here…
Sat, 09/16/2023 - 01:58

Well the example I have here is when a player right clicks with an empty hand on the entity, it is pushed away in the direction the player is facing. The difference between this code and the one you have is yours calls "event/target entity" for which entity's direction you are wanting as well as the entity you're trying the launch. The result is the entity just moves straight in the direction it is facing. I would suggest putting your code in either a global trigger like mine or in a trigger which has "entity" as well as "source entity" dependencies, otherwise this code will not work. And just for clarification, make sure you are using "source entity" block when getting the look angle vector values.""

Last seen on 15:36, 27. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for helping.  I…
Sun, 09/24/2023 - 20:26

Thank you for helping.  I figured it out a few days before you posted this.

Last seen on 04:24, 17. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No problem
Sun, 09/24/2023 - 20:33

No problem