Jump to content
Sign in to follow this  
Azaren

How check if entity does exist?

Recommended Posts

Sorry for my english…

Is there any script that can check if trigered entity does still exist?
I have script, script "mark" entity with "create particle on entity", and after time, particles will be removed. But when i kill this entity, after time i get (yelow) error, couse entity does not exist and particles from non-existed entity can not be removed. 

Is there any tip for solution my "script bug"?
I need script for check "exist trigered entity" before, but is there any?

Edited by bures.peter

Share this post


Link to post
Share on other sites

There is a tile that is simply "IS Entity" (in the English version) that will give True if the item is an entity and it exists, and will give False if it does not exist or is not an entity.

Edited by Indomitus
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks!
I´ll try it!

Edited by bures.peter

Share this post


Link to post
Share on other sites

if your question still actual.... hope this can help to you. use label for entity (for example if entity from template use "on entity spawn" ->  "add entity label") 

image.png.1296e37e0b9f3900e5e4bca2a39c1cff.png

after this you can calculate count entity with this label. here I check if entity count is lower 1 (I mean 0) then I can add what to do if there no entity with my label

image.png.7ac2f8a2e01f54dfe06eac6200f0bcff.png

hope it will help you. (sorry for my English too)

  • Thanks 1

Share this post


Link to post
Share on other sites
On 5/23/2020 at 10:44 PM, Heidenlarm said:

Variant with IS Entity

photo_2020-05-23_23-41-59.jpg

Using "Is Entity (Rabbit)" after "If" is enough. There is no need to use if ("Is Entity (Rabbit) " = True)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×