| 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: |
| Where the *#&$ has my cursor gone. | |
|---|---|
| Tweet Topic Started: Nov 14 2007, 10:49 PM (562 Views) | |
| Bami | Nov 14 2007, 10:49 PM Post #1 |
|
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.
| |
![]() |
|
| raz | Nov 14 2007, 11:12 PM Post #2 |
![]()
Lead programmer of Dimension Five
![]() ![]() ![]() ![]() ![]()
|
same here |
![]() Will you be there? | |
![]() |
|
| Dr. Best | Nov 14 2007, 11:24 PM Post #3 |
|
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 .
|
![]() |
|
| Bami | Nov 15 2007, 12:02 AM Post #4 |
|
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.
| |
![]() |
|
| MysteriXYZ | Nov 15 2007, 12:26 AM Post #5 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Then we would have to use a lot of those, making our code VERRRRY messy :D! By the way: hi and welcome to U3D !
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| Bami | Nov 15 2007, 12:29 AM Post #6 |
|
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.
| |
![]() |
|
| MysteriXYZ | Nov 15 2007, 12:42 AM Post #7 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I was just kidding ;).
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. | |
![]() |
|
| Dr. Best | Nov 15 2007, 11:02 AM Post #8 |
|
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. |
![]() |
|
| Ruud v A | Nov 15 2007, 05:28 PM Post #9 |
|
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?
|
|
Veniogames Vēnit, ut mē occidĕret. I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer. | |
![]() |
|
| Dr. Best | Nov 16 2007, 01:16 PM Post #10 |
|
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
.
|
![]() |
|
| ashrat3000 | Nov 17 2007, 01:50 AM Post #11 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
If you mean:
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. |
|
그대를 사랑해 | |
![]() |
|
| Ruud v A | Nov 17 2007, 02:29 PM Post #12 |
|
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:
script1:
|
|
Veniogames Vēnit, ut mē occidĕret. I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer. | |
![]() |
|
| Dr. Best | Nov 17 2007, 02:45 PM Post #13 |
|
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". |
![]() |
|
| ashrat3000 | Nov 17 2007, 08:59 PM Post #14 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Hurray! That was really bugging me.
Yeah, in C++ is the same as 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 will variable scope be applied. |
|
그대를 사랑해 | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)
.






.
!
.
9:10 PM Jul 11