Jump to content

Recommended Posts

I search by tag and then need to compare the string provided as function argument with name of the prefab.

Not sure if entity:GetBasicDisplayName() is the right fucntion, it will return the string name, i dont rember if there was something like prefab.name in there somwhere.

24 minutes ago, _Q_ said:

I search by tag and then need to compare the string provided as function argument with name of the prefab.

Not sure if entity:GetBasicDisplayName() is the right fucntion, it will return the string name, i dont rember if there was something like prefab.name in there somwhere.

what exactly do you want to find? Please give an example.
Do you want to get the prefab? Or the string name? or the name like "steve" given from the "named" component ?

You get the string name by:
GLOBAL.STRINGS.NAMES[string.upper(prefab)]

You question is quite vague as to what you're wanting.

 

inst.name

inst.prefab

inst:GetBasicDisplayName()

inst:GetDisplayName()

 

TheSim:FindEntities only filters by tags, but during your iteration loop on it you can compare against these for further filtering.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...