Lua Scream
From Spring
Jump to navigationJump to searchDevelopment < Lua Scripting < Lua Scream
Scream UserData Object
Script.CreateScream
( ) -> userdata scream
This creates an userdata object, which calls a special user-defined function, when the object gets destroyed (->garbage collector). You use it like the follow:
local myScream = Script.CreateScream() myScream.func = function() Spring.Echo("AHHHHHH") end