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
Copy file name to clipboardExpand all lines: extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/activity/PlayerCloseByActivity.kt
* The `PlayerCloseByActivityEntry` is an activity that activates child activities when a viewer is close by.
25
26
*
26
27
* The activity will only activate when the viewer is within the defined range.
28
+
* If the activationRange is set, the activity will only activate when the viewer enters this smaller range after it has been deactivated.
27
29
*
28
30
* When the maximum idle duration is reached, the activity will deactivate.
29
31
* If the maximum idle duration is set to 0, then it won't use the timer.
30
32
*
31
33
* ## How could this be used?
32
34
* When the player has to follow the NPC and walks away, let the NPC wander around (or stand still) around the point the player walked away. When the player returns, resume its path.
33
35
*
36
+
* If the activationRange is set, it can prevent the entity from repeatedly activating and deactivating when the player is at the edge of the range, or allow the player to get closer to the npc before it starts walking again.
37
+
*
34
38
* When the npc is walking, and a player comes in range Stand still.
35
39
*/
36
40
classPlayerCloseByActivityEntry(
@@ -39,6 +43,8 @@ class PlayerCloseByActivityEntry(
39
43
@Help("The range in which the player has to be close by to activate the activity.")
40
44
@Default("10.0")
41
45
valrange:Double = 10.0,
46
+
@Help("Optional range in which the player has to enter to activate the activity. Must be smaller than the main range.")
0 commit comments