You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script uses an entity's ray-trace direction to then check for another entity along the ray-trace path. This script can work for both players and entities so long as the trigger supports the procedure dependencies listed below.
Procedure Dependencies
The following required dependencies are needed for the script.
Entity
World
Variables
Variables used in the script.
Scope
Type
Name
Description
Local
Entity
targetEntity
A variable to store the nearest entity to compact the code,
Local
Number
distance
A variable to keep track of the distance along the ray trace line.
Local
Number
rayX
X position for the ray trace location.
Local
Number
rayY
Y position for the ray trace location.
Local
Number
rayZ
Z position for the ray trace location/
Local
Number
checkSize
Size for testing the nearest entity.
Download
You have full permission to use these script files in any of your mods without needing to provide credits.
However, if you wish to support the work I do feel free to link to my YouTube channel.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Overview
This script uses an entity's ray-trace direction to then check for another entity along the ray-trace path. This script can work for both players and entities so long as the trigger supports the procedure dependencies listed below.
Procedure Dependencies
The following required dependencies are needed for the script.
Variables
Variables used in the script.
Download
You have full permission to use these script files in any of your mods without needing to provide credits.
However, if you wish to support the work I do feel free to link to my YouTube channel.
Changes
V1 | April 11th, 2024 | MCreator 2023.4
Beta Was this translation helpful? Give feedback.
All reactions