Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK .NET / Where is the HIDE SPRITE or HIDE OBJECT command?

Author
Message
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 19th Oct 2011 18:15
I am loading a lot of 3d objects into my scene. What I want to do is store the object IDs in an array. I then want to be able to hide those objects using the stored ID #. I know with a 3d object, it will have a .VISIBLE property. How do I reference that property to an object using its ID #? Here is DBPro code I used and what I want to do;

for i=2001 to 2090
if object exist(i)
hide object i
endif
Next

HIDE OBJECT does not appear to be in the Object3d namespace.

I also do the same thing with SPRITEs. There is a HIDE SPRITE command in DBPro, but it doesn\'t appear to be included in the NAMESPACE for SPRITES in the GDK.net either.

\".VISIBLE = false\" will work for either entity, but I cannot figure out how to accomplish this in the GDK.net.

Any ideas?

Russell B. Davis/aerostudios
jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 20th Oct 2011 18:44
Just set the visible property to true or false. Also in .net you don't have to use a reference number for the object. The objects are automatically referenced upon creation and maintained in memory until deleted. So if you want to reuse the same objects through out a program you can create and delete them each time they are used or simply hold them in a module file.



" The best slaves are the ones who think they are free. "
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 3rd Nov 2011 20:07
Thanks.

Do you know anything about the CLS() command as well? I can't figure out how to clear a bitmap for drawing on before turning into a sprite. Does it have something to do with the SYNC command?

Russell B. Davis/aerostudios

Login to post a reply

Server time is: 2024-03-28 09:28:09
Your offset time is: 2024-03-28 09:28:09