S: Access Entity created by CopyEntity?

Blitz3D Forums/Blitz3D Beginners Area/S: Access Entity created by CopyEntity?

Happy Sammy(Posted 2008) [#1]
Hi all,

s = createsphere()
entitycolor s,255,0,0

for i = 1 to 3
	e = copyentity(s)
next

; try to change color of second clone here.



1. How to change the second clone color to blue, after the next command?
2. We could use "freeEntity s". How to release the three clones?

Thanks in advance


Billp(Posted 2008) [#2]
you have to use unique variables for each copy ie.
an array e(i) = copyentity(s) or a type e\entity = copyentity(s)

for i = 1 to 3
FreeEntity e(i)
next


Happy Sammy(Posted 2008) [#3]
Thanks a lot, Billp.
:D