Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Switching ROOMS!; Here's the solution that works
Topic Started: Nov 30 2007, 01:04 AM (2,769 Views)
blackhawk
Member Avatar
Elite Member
[ *  *  *  * ]
Okay.. that doesn't work either.

Here's my code:

obj_3dcontrol: (the shop room)
CREATE:
Code:
 

Init_shop();

if global.been3donce==1 then {
SwitchView();
}
if global.been3donce==0 then {
global.been3donce=1
}


room end:
Code:
 

global.hailol=0
with(all){
if(!persistent && variable_local_exists("u3d_type")){
Destroy();
global.hailol=1
}
}
if global.hailol==1 then {
SwitchView();
external_call(global.u3d_cleanup)
external_free("Ultimate3D.dll");
global.u3d_initialized=false;
}


----

Even this does not work. It works when i open the shop room the first time. When i leave it its okay. Then when i open it again, its a non-render and when i leave the room it hangs.

Here is my game code:
obj_control
create event:
Code:
 

Init_shop();

if global.been3donce==1 then {
//external_call(global.u3d_init,window_handle(),20,20,global.viewwidth/4,global.viewheight/4,global.u3d_z_buffer_format,global.u3d_multi_sample_type,global.u3d_use_right_handed_coordinate_system,global.u3d_device_type,global.u3d_few_message_output);
SwitchView();
//SwitchView();

}
if global.been3donce==0 then {
global.been3donce=1
}



key press escape:
Code:
 

if global.online==1 then {
clearbuffer();
writebyte(3);
writebyte(global.myid);
writestring(global.username,true)
sendmessage(global.clienttcp);
}
global.hailol=0
with(all){
if(!persistent && variable_local_exists("u3d_type")){
Destroy();
global.hailol=1
}
}
if global.hailol==1 then {
SwitchView();
external_call(global.u3d_cleanup)
external_free("Ultimate3D.dll");
global.u3d_initialized=false;

}
room_goto(rm_account);


--

both the objects are NOT persistent.
Omg you guys this is SO AWESOME
Check this shit out. How the hell is THAT possible?
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
I tried around with it and it works without any issues. As an example take this file I created for the test. Copy it into a folder with the Ultimate3D.dll. Press D to clean up, R to get to the other room and again R to get back to the Ultimate 3D room. Relevant events are the destroy event of the control object, the D key press event of the control object and the R key press event of the room_control object.

Ensure that you are using Ultimate3D 2.1.1.
Offline Profile Quote Post Goto Top
 
blackhawk
Member Avatar
Elite Member
[ *  *  *  * ]
Oooh, i've been so dumb. Sorry.

You see the create event?

if global.been3donce==1 then {
SwitchView();
}

that shouldn't be there since the view is being reset when the DLL is unloaded..
It works just great now. Thanks a lot!
Omg you guys this is SO AWESOME
Check this shit out. How the hell is THAT possible?
Offline Profile Quote Post Goto Top
 
bsmail78
Advanced Member
[ *  *  * ]
OMG!! :o

This U3D Engine is going to kill me trying to learn it..... given all the issues users far more experienced then me are having....
Offline Profile Quote Post Goto Top
 
Animaster78900
Member Avatar
Forum Jedi (Guardian)
[ *  *  *  *  * ]
beautifulrolex
Aug 27 2010, 11:06 AM
Links
Nov 30 2007, 10:21 AM
I have a camera. It's just a crash, no messages, game just stops responding.

Did anyone ever maned to switch rooms while using U3D??
I've actually never seen it done.

I have a camera. It's just a crash, no messages, game just stops responding.

Did anyone ever maned to switch rooms while using U3D??
I've actually never seen it done._____________________
Replica Watches
Rolex Watches
Replica Watches
Annoying Spambot Alert, get rid of it! ^o)
Posted Image
Project Silent Hill : Redemption...2.5% done. (Yay! its back into production.)
Model Freebies: On hold
Model Request: Falcon Sword: 100%, Sniper: 0%, Glock: 0%, Sword #2: 0%
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
I thought something stinks...
Posted Image My Webpage
ME? hate people? look how happy i am... :P
Go Ahead punk.. hit that pm button.. make my day....
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply