Jump to content

Recommended Posts

Posted

I would like to see some sort of dynamic list property for lua scripts.

 

This property would be similar to an --entity property but with the extension that you can add multiple entities. Not only would this be usefull to create a list of entities, but it could also benefit for iteration order.

 

The treeview of a scene is not perce the fixed order entities are processed. Using this list we can tie items to an index.

 

In code this could look like


Script.gameStates = nil --entitylist "states"

function Script:Start()
 for key,value in ipairs(self.gameStates) do
   print(key.." = "..value)
 end
end

  • Upvote 2

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...