2011-11-30 14:23:12

Hi,
I have posted this to  blastbay too, but I'm posting here to get help quicker. Can you please help with my Dynamic_menu? It says "welcome!" and the  program shuts down.
I talked enough, here's my code:
#include"dynamic_menu.bgt"
void main() {
show_game_window("testmenu");
tts_voice speech;
speech.speak_wait("Welcome!");
dynamic_menu mainmenu;
mainmenu.wrap=false;
mainmenu.allow_escape=true;
int playerchoice=mainmenu.run("Please select an option and press enter to activate it.",true);
mainmenu.add_item_tts("Start the test.");
mainmenu.add_item("exit");
if(playerchoice==1) {
alert("This is a test!","This is a test!");
}
if(playerchoice==2) {
alert("Cheepscape","Exiting...");
exit();
}
}

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2011-11-30 14:33:05

hi burak,
why are you doing bgt, are you thinking of making any game on your own?

this must be a dream...!

well, if you do come out with a game, it would be a miracle! just miracle indeed!

just look at your age and resources? lol!

ok, can you proove yourself a bit by recording your voice and talking about something?

that would be a nightmare again!

lol burak, just lol!

He picked up the wrench and broke the guy’s wrist with it, one, and then the other wrist, two, and turned back and did the same to the guy who had held the hammer, three, four. The two men were somebody’s weapons, consciously deployed, and no soldier left an enemy’s abandoned ordnance on the field in working order.

2011-11-30 15:12:35

Burak,
If you looked at the examples you would know you have to actually add items to your menu before running it.

Best Regards,
Hayden

2011-11-30 15:37:19

Hi,

Hayden's right. You're trying to run an empty menu, and adding items to it when you've actually exited it again. You should know that the menu stops any further execution of the script beyond it until it's out of the menu loop.

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2011-11-30 16:59:18

haha!

"dont let me down"
i like that song very much, and a few others too, beatles rocks.

He picked up the wrench and broke the guy’s wrist with it, one, and then the other wrist, two, and turned back and did the same to the guy who had held the hammer, three, four. The two men were somebody’s weapons, consciously deployed, and no soldier left an enemy’s abandoned ordnance on the field in working order.

2011-12-01 05:13:40

Hi burak and others.
hmm maybe you should look at the menu's tutiral. i can't remember where it is apart from it is in the help file somewhere. it gives you all the stuff you nead to put in the dinamic menu. so you could look at it then see what you nead to add to the menu.
hope this helps.

I'm gone for real :)

2011-12-01 09:01:47

Hi,

Actually, Hayden already told him what he did wrong. If he cuts the Run-part below the add_menu_item-options, then it probably will work.

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2011-12-01 12:04:17

Thank you. Sid, you don't need to be surprized much, I have a friend who  did a snakes and latters, etc etc.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2011-12-01 12:10:59

Ok, it worked, but now when I press down arrow, it exits.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2011-12-01 13:35:26

@sid, Burak is doing exacly what should be done with bgt, namely he's testing things out, practicing and learning with the eventual desire to create a game.

I don't think its a matter of age or resources, it's a matter of putting in the time and trouble, and that's great.

I'd personally much rather have someone who puts in the work learning and practicing to later make a fantastic game as indeed Philip himself did at about 14 when he made 3D snake, tarzan junior etc, than someone who rushes through and creates a practice game that has more bugs than gameplay, then complains about it.

So I think Burak is just on the right track here, and deffinately should only think about creating a propper game when he's got the skills to do so, sinse it'll be a far better game in the long run.

as regards voice acting, that is a totally different matter, and it's certainly not true that anyone who makes a game should be good at recording or acting.

thomas ward indeed apparently has a very bad speaking voice which is why he does not speak in his own games or record audio reviews, ----- though as we all know his programming and game creation skills are very superiorr.

With our dreaming and singing, Ceaseless and sorrowless we! The glory about us clinging Of the glorious futures we see,
Our souls with high music ringing; O men! It must ever be
That we dwell in our dreaming and singing, A little apart from ye. (Arthur O'Shaughnessy 1873.)

2011-12-01 16:52:05

Hi Burak,
Upload the code agin, I'll have another look.

Best Regards,
Hayden

2011-12-01 18:45:01

Here ya go
#include"dynamic_menu.bgt"
void main() {
show_game_window("testmenu");
tts_voice speech;
speech.speak_wait("Welcome!");
dynamic_menu mainmenu;
mainmenu.wrap=false;
mainmenu.allow_escape=true;
mainmenu.add_item_tts("Start the test.");
mainmenu.add_item("exit");
int playerchoice=mainmenu.run("Please select an option and press enter to activate it.",true);

if(playerchoice==1) {
alert("This is a test!","This is a test!");
}
if(playerchoice==2) {
alert("Cheepscape","Exiting...");
exit();
}
}

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2011-12-01 19:24:20

Hi,

this may be that you're actually creating one TTS-Option, and another entry which is not TTS. You might want to check that.

I can just remember the days of DZK-games. Oh no... Don't even. It was probably the worst way to start out... I kinda regret it. But it's only due to it that I'm where I am now. Still, OMG, no thanks. big_smile

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2011-12-01 23:13:00

Hi burak,
what dragon said is true. i just tested your coad and it works apart from like you say it exits when you press the down aro.
what you nead to do is ad _tts to your exit coad.
hope that helps.
brad.

I'm gone for real :)

2011-12-02 10:55:50

I noticed it. Thanks, now the menu is totaly self voicing. I couldn't do the speaker test pan, but it's self-voicing.  If you're interested, I can rar it and send it.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2011-12-02 11:15:12

hi
hey.. can someone tell me, where should i  test my code on, BGT?

should i open a notepad? or what.

thanks!

twitter: @hadirezae3
discord: Hadi

2011-12-02 11:26:08

Hi,

I write most of my code in EdSharp. When trying to run a BGT script, you provide the bgt.exe file with the path to your script. It will be loaded and executed.
So, write a bit of code, save, test. If any, fix errors, test again. If everything's working fine, continue on writing more new code. Test again. If any, fix errors... And so on, and so on.

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2011-12-02 14:46:07

Ghorthalon is right. I personally just code in Notepad, and since I have BGT properly installed, when I simply press enter on a BGT script in Windows Explorer or Total Commander, it gets run by the BGT interpreter right away. When I want to edit it, choosing the corresponding option in the script's context menu is a matter of less than two seconds.
Hope this was actually an answer to what you were in fact asking for. :-D
Lukas

I won't be using this account any more or participating in the forum activity through other childish means like creating an alternate account. I've asked for the account to be removed but I'm not sure if that's actually technically possible here. Just writing this for people to know that I won't be replying, posting new topics or checking private messages until the account is potentially removed.

2011-12-02 14:49:15

Hi,

EdSharp just has some features that I personally really find useful for coding. Like autobackup before run, one-key launch without even closing the editor, being able to navigate by blocks like If-statements or While loops, enhanced search, jumping to lines or percentages of a file, and all those that make coding fun and fast. However, most of my code was written in Notepad, I've just started using Edsharp and realising how great it is. tongue

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2011-12-02 15:10:24

Hi,
I've messed around with it as well, and have found it useful, although I wish it were made to not have those graphics whe navigating. Ah well--you take what you have and make the best of it.
Ad for DZK, it wasn't a bad start--version 2.4 of Bonus Game had some actual possibilities, although the way you could simply keep walking back and forth and picking up items made things...easy?

Best Regards,
Hayden

2011-12-02 18:54:20

Hi,

Graphics? Which graphics do you mean?

I don't even have the 2.5 version anymore. I wonder if someone could like upload it and stuff. Now I'm curious to play it again.

--
Talon
Wanna play my Games? Listen to my Music? Follow me on Twitter, and say hi~
Code is poetry.

2011-12-02 19:13:13

I do seriously consider looking into a code editor myself one day. Notepad is just okay for me, for the time being, but the convenience of an editor like this could definitely make things much nicer. :-)
Lukas

I won't be using this account any more or participating in the forum activity through other childish means like creating an alternate account. I've asked for the account to be removed but I'm not sure if that's actually technically possible here. Just writing this for people to know that I won't be replying, posting new topics or checking private messages until the account is potentially removed.

2011-12-02 20:56:52

I do the same way. I edit it in notepad.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2011-12-02 22:25:16

hello

thanks dragon and lukas, i just got it..

well, i don't want to create a topic for my basic questions,
but what language would you recommend me, to study, to be able to  code in BGT?

i'm pretty newb, and it's been 3/4  months that i'm trying to find what language should i start learning.

thanks!

twitter: @hadirezae3
discord: Hadi

2011-12-02 23:35:46

Read the tutorial, there are the basics of the language, and some examples about making some objects like menus.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page