AGS coding tutor
Moderators: adeyke, VampD3, eriqchang, Angelus3K
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
AGS coding tutor
Anyone intrested in helping me learn the languge of AGS?
Yes because you're one post away from a talented AGS coder to teach you everything in just one read.
Look, learning AGS isn't easy like that. Check the AGS tutorials at www.bigbluecup.com and you should learn more from there.
Look, learning AGS isn't easy like that. Check the AGS tutorials at www.bigbluecup.com and you should learn more from there.
Anyone intrested in helping me learn the languge of AGS?
I'm sorry. It's an ancient language known only to a few people, known as Elders.
If one wishes to learn the language of the AGS (Ancient Grand Signs), he needs to join a tribe of Elders, and spend almost eternity with them, before he could say simple words, such as: "daddy".
Well, that's another way to say I fear I cannot help you with AGS
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
I didnt say it was easy Broomie I am willing to learn and work hard today I tried a simple command using the manual
I aready have the music in the music folder as music0.mp3
yet I get a error "error line 2 unexpected 'playmusic' what have i done wrong?
Code: Select all
Playmusic(0);
yet I get a error "error line 2 unexpected 'playmusic' what have i done wrong?
-
- The Prince of Shapeir
- Posts: 8887
- Joined: Tue May 08, 2001 4:12 am
- Location: Phobos
- Contact:
The functions are case-sensitive. Instead of Playmusic(0); it should be PlayMusic(0);
I recommend you take Broomie's advice and start out with simple stuff by looking over posts at the AGS Beginner's Technical forum. The more things you try with AGS, the more you'll remember, and the more proficient you'll become.
Good luck with it!
I recommend you take Broomie's advice and start out with simple stuff by looking over posts at the AGS Beginner's Technical forum. The more things you try with AGS, the more you'll remember, and the more proficient you'll become.
Good luck with it!
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
"Line 2" means that the line causing the error is on line 2 of your script. Since AGS already dedicates at least 2 lines for the "header" of each code-section (sections as in: "Exit to the left", "Upon entering before fade-in" etc.), I get the impression you simply put "PlayMusic(0)" at the top of the script and hoped it would work. It won't because AGS doesn't know when to execute it.
Instead of putting code straight into the script, click on the red "I" in the room editor, right-click on the "enter room after fadein"-part and either add a new action (and then select the "play music" part) or create a new "run script" action and type "PlayMusic(0);" into the editor.
You're better off looking up a tutorial on the AGS forums first though, because you need to know what you are doing.
Instead of putting code straight into the script, click on the red "I" in the room editor, right-click on the "enter room after fadein"-part and either add a new action (and then select the "play music" part) or create a new "run script" action and type "PlayMusic(0);" into the editor.
You're better off looking up a tutorial on the AGS forums first though, because you need to know what you are doing.
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
Well, this is achieved by putting a label with the text "@SCORETEXT@" on the GUI that makes up the status line of your game. (the default game template in AGS has such a thing, I believe it's GUI number 0)
You probably don't want to mess with GUI's too much until you have the basics of AGS coding down.
You probably don't want to mess with GUI's too much until you have the basics of AGS coding down.
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact:
-
- Infamous Sheik of Australia
- Posts: 1722
- Joined: Tue Apr 22, 2003 3:43 pm
- Location: Rockhampton Australia
- Contact:
It sounds like you've put the code into the script, not into the GUI.
Load up AGS and click on the GUI section.
Click on the GUI you wish to edit, in this case STATUSLINE (which is the line across the top of the screen) Designated on my example as 1.
Click on the button I've marked as 4. Thats the Label button, used for adding labels to your GUI.
Drag out a label box on your GUI somewhere. Sierra generally put it on the right side of the statusline for the score. That's number 3 on my example.
Then click on the TEXT box in the popup menu. Number 2. In there you write whatever you want it to say. As Erpy said you can add in @SCORE@ which will then display the score, or @SCORE@ of @TOTALSCORE@ is one that Sierra would have used in some games. It's up to you.
As for your music issue, try renaming the file to have a number not zero. That may be the problem. And as AGD2 said, make sure it's case sensetive (PlayMusic(1);) or whatever. Very important.
If you want to learn how to use AGS, you should try following the tutorials on the AGS site. Another system I've seen work is to grab a room from an old game you know really well, and script it out in AGS. Thats what I did when learning, looking at how to do something and then learning how to do it, usually from reading the manual.
EDIT : Just realised that this post is a couple of weeks old, hope it helps anyway.
Load up AGS and click on the GUI section.
Click on the GUI you wish to edit, in this case STATUSLINE (which is the line across the top of the screen) Designated on my example as 1.
Click on the button I've marked as 4. Thats the Label button, used for adding labels to your GUI.
Drag out a label box on your GUI somewhere. Sierra generally put it on the right side of the statusline for the score. That's number 3 on my example.
Then click on the TEXT box in the popup menu. Number 2. In there you write whatever you want it to say. As Erpy said you can add in @SCORE@ which will then display the score, or @SCORE@ of @TOTALSCORE@ is one that Sierra would have used in some games. It's up to you.
As for your music issue, try renaming the file to have a number not zero. That may be the problem. And as AGD2 said, make sure it's case sensetive (PlayMusic(1);) or whatever. Very important.
If you want to learn how to use AGS, you should try following the tutorials on the AGS site. Another system I've seen work is to grab a room from an old game you know really well, and script it out in AGS. Thats what I did when learning, looking at how to do something and then learning how to do it, usually from reading the manual.
EDIT : Just realised that this post is a couple of weeks old, hope it helps anyway.
-
- Defense Minister Status
- Posts: 614
- Joined: Fri May 14, 2004 1:07 am
- Location: Fort McMurray, Alberta, Canada
- Contact: