Jump to content

Recommended Posts

Posted

Would be great instead of having to use ForEach and function below

function Callback(camera,entity, extra)
       --We only want to execute this on models.
       if (entity:GetClass()==Object.ModelClass) then

               local name = entity:GetKeyValue("name") 
               if (name ~= "") then

                      .... 
               end
       end
end

 

Having that function hard coded in the engine could be great to simply in one line of

code get entity by name or ID like :

Map:getEntity("name")

or

World:getEntity("name")

Stop toying and make games

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...