Rick Posted May 20, 2013 Posted May 20, 2013 How can I attach a script at run-time to a model from Lua? 1 Quote
Admin Posted May 20, 2013 Posted May 20, 2013 You can't right now, but the next update has a new function Entity::SetScript(). 1 Quote
Rick Posted May 20, 2013 Author Posted May 20, 2013 OK that'll be nice. I'm only wanting to do this right now because when I attach a script to a model and save as a prefab, when I access the script after loading the prefab variables don't seem to hold through function calls. I made another post about it on the boards here. Was hoping this would be a workaround to get this working. Quote
Admin Posted May 20, 2013 Posted May 20, 2013 Wouldn't the correct approach be for us to fix the bug? Quote
Rick Posted May 20, 2013 Author Posted May 20, 2013 That's why I have the other post . This feature does add other benefits though, but one of it would have been a workaround if it was already there. Quote
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.