Why is there not a text exists function?

I’m trying to make a custom kill feed and you can’t do this:

Create HUD Text…

Append Last Text to Array…

Wait…

Destroy HUD Text(First Of(Array))

This is fine for the first text but then the text is not cleared from the array, so the first of the array will always be a text that has already been destroyed

You cannot filter the array by using a function to check if the text exists because there is no function, it’s not an entity. What am I supposed to do here…

Im not entirely sure what you are going for, but I believe you want a custom kill feed and there a problem where you need the text deleted in order for it to work.
I have an idea on how to solve this
Does it have to be HUD text? If not it’s possible you might want to use the small message action instead, but I’m not entirely sure if yours has to be HUD text, but as far as I can see, using small message should work fine

try this order:

  • create hud text
  • append last text id to array
  • wait
  • destroy hud text(first of (array))
  • modify global variable(array, remove from array by index(0))

Because using the ID of the hud text to destroy it is good, but you also have to remove it from the array afterwards.

1 Like