lets say I have 10 scenes
each contains
------>
function removeall()
cleanGroups(localGroup)
– several other functions
end
function cleanGroups ( objectOrGroup )
if objectOrGroup.numChildren then
while objectOrGroup.numChildren > 0 do
cleanGroups ( objectOrGroup[objectOrGroup.numChildren])
end
end
if (objectOrGroup ~= nil) then
objectOrGroup:removeSelf();
end
return
end
now I would like to place above two functions in a external file and include
simple (like in php) in my actual scene.
It seems it does not work with require “externalfile.lua”
as localGroup is defined in the scene itself.
its just one problem i have with that, but it does represent quiet good.
Should I have a option to do a include like in php, where it just insert the texts
from the external file, without any moduling and classifying it should work fine.
ANy Ideas (it would just save lots of code repetition)
thx
chris
[import]uid: 4795 topic_id: 21017 reply_id: 321017[/import]
that i use in several other cases… but in above (try yourself)
