anael wrote:Hi, there is no delete as it can be a bit unsafe to deal with memory from lua (as getObject handle pointers),
deactivate will totally disable the object.
If your initial need is to clone / delete lot of objects, try to see it as a buffer to reuse the same objects a maximum.
Even getClone should on maximum be used out of the update loop (for better performance).
Reason why I asked is that im doing FPS game, where i will make bullets (clone bullets) and if they are near object i would like to delete them.
But i think the bullets will go so fast that there would not be too much of them..so i can disable them and then use them again.
Is there delete in c++?
well last night i tried coding and tested and made (cloned) about 2000 objects and it still went smoothly..(very simple object)
(but also the all cloned ones rotated same time O.o cos did not have script done complete yet)
Thanks for tips will help me out
EDIT:
Further questions: when i clone the object will get the position of reference object?
also the clone object will have same parent ( or then i got some error in my code ) , so how i can just remove the parent of the object?
Last edited by pleedian (2013-04-19 10:23:27)