Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Imhotep, opm), 785 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Typing "0" unloads level?? #348421
11/26/10 17:17
11/26/10 17:17
Joined: Sep 2010
Posts: 42
NS, Canada
gSet Offline OP
Newbie
gSet  Offline 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: gSet] #348429
11/26/10 19:14
11/26/10 19:14
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
What you mean by 'unloads the level'??
Could you explain a bit more?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Typing "0" unloads level?? [Re: 3run] #348456
11/27/10 09:46
11/27/10 09:46
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Write this into the main function:

on_0 = NULL;

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
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Pappenheimer
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 Offline OP
Newbie
gSet  Offline 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 Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Originally Posted By: MrGuest
Originally Posted By: Pappenheimer
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] #348707
11/29/10 19:10
11/29/10 19:10
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Pressing "0" while testing your game will allow you to move the camera around using the arrow keys, but it will also cause the camera to abruptly change position. This will not happen in the published version of your game, with or without the "on_0 = NULL;" statement.


Eats commas for breakfast.

Play Barony: Cursed Edition!
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
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Pappenheimer
Originally Posted By: MrGuest
Originally Posted By: Pappenheimer
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

Code:
#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 crazy


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1