0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Typing "0" unloads level??
#348421
11/26/10 17:17
11/26/10 17:17
|
Joined: Sep 2010
Posts: 42 NS, Canada
gSet
OP
Newbie
|
OP
Newbie
Joined: Sep 2010
Posts: 42
NS, Canada
|
I made a function for a text box, but for some reason when you use the 0 key it unloads the level and everything in it. I can't seem to figure it out but this must be built into the engine, and I need to disable it so that the player can use the 0 key without causing problems. Is there something obvious, or a way to work around this? Can't find much in the documentation. Thanks!
"If it's true what you say to me, that the whole world will mourn his death - If the whole world will weep, I will give him back his breath."
|
|
|
Re: Typing "0" unloads level??
[Re: Pappenheimer]
#348461
11/27/10 11:27
11/27/10 11:27
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
Write this into the main function:
on_0 = NULL; this won't work unless it's after a wait() command as default.c still overwrites key functions set to NULL. or just comment out #include default.c
|
|
|
Re: Typing "0" unloads level??
[Re: MrGuest]
#348681
11/29/10 13:40
11/29/10 13:40
|
Joined: Sep 2010
Posts: 42 NS, Canada
gSet
OP
Newbie
|
OP
Newbie
Joined: Sep 2010
Posts: 42
NS, Canada
|
It seemed like 0 was unloading the level (sorry for the lack of clarification on that but it's now not necessary..) but it actually seems to be doing something strange with the camera, maybe placing it below the level. I tried commenting out #include default.c, but I think it's included whether or not you state that in the newest version, so I can't tell if it's because of some built in functionality for 0 or because of some strange thing in my own code.
I'm open to suggestions, but I'm also just going to keep looking through my own code to see if that may be the problem - though I can't find anything so far...
Edit: Placing on_0 = NULL; in my main function actually fixed this, so regardless of the problem it's not happening anymore.. I just wish I knew what it was.
Last edited by gSet; 11/29/10 13:43.
"If it's true what you say to me, that the whole world will mourn his death - If the whole world will weep, I will give him back his breath."
|
|
|
Re: Typing "0" unloads level??
[Re: MrGuest]
#348706
11/29/10 18:51
11/29/10 18:51
|
Joined: Sep 2003
Posts: 5,900 Bielefeld, Germany
Pappenheimer
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
|
Write this into the main function:
on_0 = NULL; this won't work unless it's after a wait() command as default.c still overwrites key functions set to NULL. or just comment out #include default.c This makes no sense to me. The engine reads through the scripts from beginning to end. When #include default.c is before the main function, it can't overwrite the on_0 = NULL; - that's at least how I understand it.
|
|
|
Re: Typing "0" unloads level??
[Re: Pappenheimer]
#348733
11/29/10 23:13
11/29/10 23:13
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
Write this into the main function:
on_0 = NULL; this won't work unless it's after a wait() command as default.c still overwrites key functions set to NULL. or just comment out #include default.c This makes no sense to me. The engine reads through the scripts from beginning to end. When #include default.c is before the main function, it can't overwrite the on_0 = NULL; - that's at least how I understand it. lol, if I ever understood what gamestudio tried doing I'm sure I'd have a medal by now
#include <acknex.h>
#include <default.c>
void main(){
on_esc = NULL;
}
running this will still close the application when pressing escape, though I'd of thought when reading through default.c it would run any _startup() functions before the main() function, obvsiously not in this case
|
|
|
|