forced player actions

Started by TZO_Ghoul on

Topic category: Feature requests and ideas for MCreator

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
forced player actions

I was wondering if it was possible for a procedure block to be added that forces a player action, something that uses mouse and or keyboard key-binds, something like if the player is holding [curse of binding pumpkin] the user right clicks it / if player is looking at a villager and and iron golem is within 20 blocks make player punch / forcing the player to jump if they touch a specific block / clicking the [F] key causes the player to punch. The examples I gave could be made without the need for this feature but it makes it more fitting with a feature like this to exist for them. I am aware that there is something like that already in Mcreator but it only works for blocks.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok this might work. but its…
Thu, 02/01/2024 - 03:51

ok this might work. but its gonna be pretty complicated in my opinion.

1st create a Local variable and name it "yaw"

2nd the block [does entity exist at xyz in square cube with size 4 of type "no entry selected"]

in X: cos[[[get local: yaw + 90] * [pi / 180]]

in y: [[head pitch of event/target entity in degrees] * [ -0.005]]

in z: sin[[[get local: yaw + 90] * [pi / 180]]

this should search if theres an entity of your choice right where your looking, i hope lol

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
aww i forgot, right after…
Thu, 02/01/2024 - 03:55

aww i forgot, right after you create the variable "yaw" you have to Set local: yaw to: direction (yaw) in de.g relative to S of Event/target entity