Welcome Guest [Log In] [Register]
Viewing Single Post From: Switching ROOMS!
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
detuhooja
May 5 2008, 09:01 PM
Dr. Best
Nov 30 2007, 06:55 PM
Problem 2, switching from a room, which uses Ultimate 3D to a room which doesn't:

Solution 1, recommended if Ultimate 3D needs to be used again lateron:
This solution just disables the rendering output of Ultimate 3D temporarily and makes sure that all objects get destroyed correctly. Again the control object should be persistent! This code can be used in the room end event of the control object then:
Code:
 
with(all){
   if(!persistent && u3d_type!=0){
       Destroy();
   }
}
SwitchView();

This doesn't work in u3d 2.1?
I tried that in newest sdk and other examples. Of course i got this work older version of u3d.

Get error:
___________________________________________
ERROR in
action number 1
of Other Event: Room End
for object control:

Error in code at line 2:
if(!persistent && u3d_type!=0){

at position 23: Unknown variable u3d_type

This solution requires that the option "Treat uninitialized variables as value zero" of Game Maker is enabled in the options of the Game Maker project. In Ultimate 3D 2.0 RC and earlier this was the case by default. You can either enable this option yourself now or you can use this modified code:
Code:
 
with(all){
   if(variable_local_exists("u3d_type")){
       if(!persistent && u3d_type!=0){
           Destroy();
       }
   }
}
SwitchView();
Online Profile Quote Post
Switching ROOMS! · Questions about Ultimate 3D