Alienhead Posted April 7 Share Posted April 7 ( LUA ) I'm trying to preform a few simple tasks with no luck whatsoever. 1) Get and Set an Entities NAME. 2) Cycle through a worlds Entity list. 3) Create a custom Collision Type 4) Get a single Entities TAG ( collidedEntity:GetTag() ) does not exist or collidedEntity:GetName() or something. 5) When using World:GetTaggedEntities() what suffix is the handle in the LUA table ? For example: self.UAGCLadders = world:GetTaggedEntities("UAGCLADDER") Theres no example or documentation telling me what handle this data is stored under in the table. Ex: self.UAGCLadders.WHATGOESHERE ? I can cycle the table like self.UAGCLadders[1] but its much easier not keeping track of table lengths. #self.UAGCLadders. for t=1, #self.UAGCLadders do end Appreciate any help you may be able to give. I've been stuck on these for a few days now. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Dreikblack Posted April 8 Share Posted April 8 1) entity.name = "name" 2) Only in maps - map.entities. For World only tagged and in area 3) Just set an integer bigger than 6 with Entity:SetCollisionType. btw @Josh CollisionType enum seems being not exposed in LUA local NEW_COLLISION = 7 box1:SetCollisionType(NEW_COLLISION) https://www.ultraengine.com/learn/Entity_SetCollisionType?lang=lua https://www.ultraengine.com/learn/World_SetCollisionResponse?lang=lua 4) No GetTag() atm but it should be possible to iterate entity.tags but in my test example it return nil so probably not exposed in LUA @Josh 5) Not sure what you mean Maybe you want that: for n, entity in pairs(world:GetTaggedEntities("tag")) do local entity = Entity(entity) Print(entity.name) end 1 Quote Link to comment Share on other sites More sharing options...
Alienhead Posted April 8 Author Share Posted April 8 Outstanding, appreciated. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.