Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Entities despawning when target is set

Open Com2486 opened this issue 9 months ago • 1 comments

Skript/Server Version

> skript info
[20:12:25 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[20:12:25 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[20:12:25 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[20:12:25 INFO]: [Skript] Server Version: git-Paper-496 (MC: 1.20.4)
[20:12:25 INFO]: [Skript] Skript Version: 2.8.5 (skriptlang-github)
[20:12:25 INFO]: [Skript] Installed Skript Addons: None
[20:12:25 INFO]: [Skript] Installed dependencies: None

Bug Description

I was trying to make entities pathfind and attack the nearest player. They did, but when I looked at them, they started randomly despawning. Here is some of the code I was using bug code.txt

Expected Behavior

Entities should not disappear while players look at them.

Steps to Reproduce

1: Create a server with Skript 2: Write code that loops all entities, and sets their target 3: Look at an entity, and watch it disappear

Errors or Screenshots

Here is an unedited video of the error https://youtu.be/bqXTlg1Tlmc

Other

No response

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this report.

Com2486 avatar May 13 '24 01:05 Com2486

You're setting your own target to the nearest player to yourself, which is none. Hence, you're deleting your target. This, arguably, is working as intended.

sovdeeth avatar May 13 '24 20:05 sovdeeth