Posted: 19th Jun 2003 1:13
I don't know how many of you know my solution or if it has been posted before, but I'm sure most of you know that when you run in Full Screen Exclusive mode, and then you Alt-Tab, you get some form of "Object not found" error. I found out how to get rid of this and it really isn't that difficult to do!

[Check Code Box]

What it does is immediately checks at the beginning of the loop to see if the object exists, if it doesn't it reloads them. I tried this code expecting that it wouldn't work because you could Alt-Tab at any point in the program and wouldn't be able to track it, but it seems that DBP runs your loop a few times after it can't find the objects trying to find code that will load them. It worked for me with GameSpawn and it should work for you!
Posted: 20th Jun 2003 2:34
hey! nice little find there, thanks. and i assume you have to do the "if cant find the objects then load them" code for every object in every loop?


if this slows it down at all could you do somthing like this so it wouldnt check it every loop, only every few loops...

+ Code Snippet
c=0

DO
c=c+1
if c=1
   Rem This does the trick!
   If object exist(0) = 0 then LoadObjects()

   Yrotate object 1, object angle y(1) + .1
   Yrotate object 2, object angle y(2) + .1
   Yrotate object 3, object angle y(3) + .1
endif
if c>2 then c=0
LOOP

Rem This is the loading point of all objects in the game
Function LoadObjects()
   Make object cube 1,5
   Make object cube 3,5
   Make object sphere 2,5

   Position object 1, -10,0,10
   Position object 3, 10,0,10
   Position object 2, 0,0,10   
EndFunction

Posted: 20th Jun 2003 6:40
hmmm... not sure. I don't have dark basic available right now, but heck... you got me curious. I'm going to try it out when I get home!