If there is anyway in cheatutils I can filter some entities by it's ID? #238
Answered
by
Zergatul
Andy718811
asked this question in
Q&A
-
|
Here is my code. Here is my another code using event scripting. I wonder if there is any way I can ignored the entities that already processed by "interactWithEntity", and let palyer won't target at same entity and interact with same entity over and over again. |
Beta Was this translation helpful? Give feedback.
Answered by
Zergatul
Mar 21, 2026
Replies: 1 comment 8 replies
-
|
Create static array variable and add entity ids you don't want to interact with. // in the beginning of the script
static int[] skipIds = [];
void addToSkip(int id) {
skipIds += id;
}
boolean shouldSkip(int id) {
foreach (int i in skipIds) {
if (i == id) {
return true;
}
}
return false;
} |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe because when you interacted once, you should return from event handler. So it will not interact with another entity in the same tick. Also you can add some debug output to better understand if the script is doing something you are expecting.
debug.writeorui.systemMessage