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
Where the *#&$ has my cursor gone.
Topic Started: Nov 14 2007, 10:49 PM (562 Views)
Bami
Member Avatar
Guess the character, win a prize
[ *  *  *  *  * ]
Probably a very novice question (yeah, boredom, so I thought, hell, why not learn U3D in the process).

Where the )#(*$ does your cursor go when you enable U3D? It's still there (visible around the game window), but invisible in the window itself.
Yes, I enabled "show cursor" in game options, and it shows the cursor in the game window when I delete all U3D objects from the current room.

Is it done somewhere in the DLL, or in any of the scripts?

I need my precious cursor :( .
Here are the thrill seekers, corrupt and immoral.
Posted Image
Offline Profile Quote Post Goto Top
 
raz
Member Avatar
Lead programmer of Dimension Five
[ *  *  * ]
same here
Posted Image
Will you be there?
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
In GM 5.x Game Maker had the nice variable show_cursor, which made it possible whether the cursor is to be displayed or not. In Game Maker 6.0 and higher a feature like this doesn't exist anymore. There is no way in which Ultimate 3D can find out whether it should display the cursor or not, so you need to tell it about this manually, by setting control.show_cursor to true.

P.S.: This isn't the first time this question is being asked here and the next version of the documentation will document this explicitly ;) .
Offline Profile Quote Post Goto Top
 
Bami
Member Avatar
Guess the character, win a prize
[ *  *  *  *  * ]
I see.
Another thing I saw is "Treat uninitialized variables as 0", which is a VERY dirty way of making things work.

I would suggest all if statements that could include a uninitialized variable use
variable_local_exists and variable_global_exists.
Here are the thrill seekers, corrupt and immoral.
Posted Image
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
Bami
Nov 15 2007, 12:02 AM
I see.
Another thing I saw is "Treat uninitialized variables as 0", which is a VERY dirty way of making things work.

I would suggest all if statements that could include a uninitialized variable use
variable_local_exists and variable_global_exists.

Then we would have to use a lot of those, making our code VERRRRY messy :D!

By the way:

hi and welcome to U3D :) !

:P
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
Bami
Member Avatar
Guess the character, win a prize
[ *  *  *  *  * ]
Welcome to U3D?
Look at my join date lulz.

I worked with U3D before, but like the pre-release thing of u3d 1.

About making code very messy, believe me, it cleans up code like no tomorrow.
I've encountered numerous instances on where something screwed up because an initialized variable got set to 0, and then you don't see why it's wrong.
Here are the thrill seekers, corrupt and immoral.
Posted Image
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
Bami
Nov 15 2007, 12:29 AM
Welcome to U3D?
Look at my join date lulz.

I worked with U3D before, but like the pre-release thing of u3d 1.

I was just kidding ;).

Bami
Nov 15 2007, 12:29 AM
About making code very messy, believe me, it cleans up code like no tomorrow.
I've encountered numerous instances on where something screwed up because an initialized variable got set to 0, and then you don't see why it's wrong.

Yes I do realize that, but then a lot of the core U3D scripts would have to be modified too. Anyway, I'll let you fight that one out with Dr. Best :D.
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
For the SDK of Ultimate 3D 2.0 final I will check whether there is any pretty way to change the scripts so that they don't require the "Treat uninitialized variables as value 0" option. This can only work if Game Maker allows the initialization of local object variables in scripts, that are being called in the create event. Otherwise internal Ultimate 3D variables like u3d_index and u3d_type, which are not meant to be initialized by the user, couldn't be used anymore.
Offline Profile Quote Post Goto Top
 
Ruud v A
Member Avatar
Programmer · Artist
[ *  *  *  *  * ]
You can just initialize the variable by assigning a value to it before you use it in combination with operators like < == != > += -= /= *=, etc. So you don't need to change anything, except calling variablename = 0 before you use it... Is that so hard? :o

Veniogames
Vēnit, ut mē occidĕret.

I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
I'm not working with Game Maker that frequent, so I wasn't sure whether it was allowed to initialize object variables within scripts, as I said above ;) . If it is, the whole thing is no problem ^_^ .
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
If you mean:

Code:
 

x = 3;
y = 5;
hello = 9;
var blah;
globalvar hi;


As a script, yeah, you can do that. In GM.
If you are talking about variable scope (or something like that) in C++, I'm not sure, i only know the basics of C++. To my knowledge, there is no variable scope in GML.
그대를 사랑해


Offline Profile Quote Post Goto Top
 
Ruud v A
Member Avatar
Programmer · Artist
[ *  *  *  *  * ]
In fact there is, global variables are variables like global.blah = 10, or in gm7 you can declare them like this: globalvar blah; blah = 10; Local variables exist too, objects contain local variables like x and y. And variable scopes exist too. If you declare a variable with the var keyword, it only exists until the end of the script/piece of code. So this will not work:
script0:
Code:
 
var xxx; xxx = 10;

script1:
Code:
 
script0(); show_message(string(xxx));

Veniogames
Vēnit, ut mē occidĕret.

I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
I just did a little test on this and found out that Game Maker is a lot less strict then I had thought regarding the initialization of variables. Every write-only operation for a variable can be used to initialize it, no matter where it's done. Now that I know this I can tell you that Ultimate 3D 2.0 final will be modified in a way that will make it work without "Treat uninitialized variables as value 0".
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
Hurray! That was really bugging me. :D

Yeah, in C++
Code:
 
int testvar;
is the same as
Code:
 
testvar = 0;
in GML.
Except that testvar = 0 in GML will work for any piece of code in that object.
Like Ruud v A said, only if you say
Code:
 
var testvar; testvar=0;
will variable scope be applied.
그대를 사랑해


Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply