Author Topic: MODULE: Credits v1.19  (Read 21910 times)

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
MODULE: Credits v1.19
« on: 22 Sep 2005, 16:22 »
The normal download now includes the source for a demo game. Demo game requires 2.72beta7 but the module should work with AGS v2.71 or later. Version 1.19 now makes translations work properly (which 1.18 failed at).

Credits module.

I never used the Creditz plugin, but I read the help file and tried to match its functionality.

Where n is credit seuqence number, staring with 0
//   Credit[n].AddTitle(const string t, optional int x, optional int font, optional int colour)
//   Credit[n].AddCredit(const string t, optional int x, optional int font, optional int colour);
//   Credit[n].AddImage(int sprite, optional int x, optional int valign)
//   Credit[n].Run();
//   Credit[n].Pause();
//   Credit[n].Stop();
//   Credit[n].IsRunning();

Example:

Code: Adventure Game Studio
  1. Credits[0].DefaultCreditFont=3;
  2. Credits[0].DefaultTitleFont=3;
  3. Credits[0].DefaultTitleColour=65000;
  4. Credits[0].DefaultCreditColour=15;
  5. Credits[0].Delay=1;
  6.  
  7. Credits[0].AddTitle("Scripting by");
  8. Credits[0].AddCredit("SSH");
  9. Credits[0].AddImage(12, eCreditCentred, eCreditAlignBelow);
  10. Credits[0].AddTitle("ScrollingCredit Module by");
  11. Credits[0].AddCredit("SSH again!");
  12. Credits[0].Run();
  13.  

Have fun!

Download Credits module here (Requires AGS v2.71!)
View Full instructions
« Last Edit: 13 Aug 2009, 12:09 by SSH »

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens Monarch
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: MODULE: ScrollingCredits v1.0
« Reply #1 on: 24 Sep 2005, 12:34 »
Good stuff -- I haven't had time to try it out yet, but having a module alternative to the Creditz plugin will be very handy  :)

vampyredcs

  • Guest
ScrollCredits question using ScrollingCredits module 1.0
« Reply #2 on: 24 Oct 2005, 10:54 »
I have switched from the plugin to the module because I was getting an error about "const string" and was unable to find a work around. (Using AGS v2.71 RC2 and Credtis plugin v2.0.0.6).

Credits run but I am unsure how to change rooms after said sequence finishes.  AJA's plugin had a 'IsCreditsFinished' function.  Is there such a feature in the new module by SSH?

Thanks

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: ScrollCredits question using ScrollingCredits module 1.0
« Reply #3 on: 24 Oct 2005, 11:12 »
Hey, I'm glad someone's using this. I guess if the plugin doesn't work with AGS 2.71 then it will be used a lot more... but maybe CJ should put something in that makes older plugin APIs work with the new strings, otherwise everything will need to be recompiled.

The answer is:

Code: Adventure Game Studio
  1. if (Credits[n].IsRunning == eCreditFinished) {
  2.  
  3. }
  4.  

as described in the script module README and in the module header:

//   Credit[n].IsRunning();
//      This function returns a value of type CreditRunning_t, which will be equal to
//      eCreditFinished when the sequence has finished.

although, now I notice that this says Credit rather than Credits: another thing to fix in the next version!

Edit:

So, I've fixed most of the problems with the Static credits and now both versions should work. See top post for details

I've also included a function that inserts linebreaks into typewriter credits to make the wordwrap look better

Edit 2:

Please feel free to suggest improvements or note bugs, although I don't promise to fix any!
« Last Edit: 19 Mar 2007, 21:40 by strazer »

Re: MODULE: Credits v1.12
« Reply #4 on: 13 Nov 2005, 04:07 »
Yo, SSH!

This is awesome!, I like this better than Aja's

much eaiser to use, too!

i can't get his to work for NOTHING!

 ;D ;D ;D ;D ;D ;D ;D :-*
Narcolepsy (BACK IN PRODUCTION)
Story (50%)
Graphics (5%)
Puzzles(20%)
Programming(15%)

Still Reading Commercial Emails For Free?
Receive Emails On Topics That Interests You
And Get Paid For It! Get $10 Just to signup!
http://hits4pay.com/members/index.cgi?bleckman1974

Candle

  • Truly Hated
Re: MODULE: Credits v1.12
« Reply #5 on: 13 Nov 2005, 11:07 »
How to add player.ChangeRoom(player.PreviousRoom); so at the end it will return to last room? I get an overlay error now when I add that to the end of the credits lines.
« Last Edit: 07 Apr 2006, 20:19 by strazer »

Ashen

Re: MODULE: Credits v1.12
« Reply #6 on: 11 Dec 2005, 22:25 »
In the repeatedly_execute function for the room, just put:
Code: Adventure Game Studio
  1. if (Credits[0].IsRunning() == eCreditFinished){
  2.   player.ChangeRoom(player.PreviousRoom);
  3. }
  4.  

At least, that works in the version I have.
« Last Edit: 07 Apr 2006, 20:20 by strazer »
I know what you're thinking ... Don't think that.

Re: MODULE: Credits v1.13
« Reply #7 on: 23 Mar 2006, 22:09 »
so, I had this error:

"Error (line 116): type 'string' is no longer supported; use String instead"

If I changes it to "String" I get an error on the next line instead...
Subscribe to MAGSAN: http://eepurl.com/ca5dTv

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.13
« Reply #8 on: 24 Mar 2006, 09:48 »
Hmmm, I thought I'd documented that the "Enforce new style Strings" checkbox in the General settings of the editor needed to be unchecked... sorry!
« Last Edit: 19 Apr 2006, 23:12 by strazer »

The_Creep

  • Later...in the emergency room
Re: MODULE: Credits v1.13 (new dl site)
« Reply #9 on: 17 Apr 2006, 21:09 »
Great Module SSH thanks! I just have one question, and I feel kind of silly asking, I have my messages displayed in a custom textbox (GUI 3) and the credits also display in this textbox (and the textbox size stretches all the way to the right hand edge of the screen), do you know how I can make the credits just display as plain text?
If you had nothing left, would you risk it all to change everything?

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.13 (new dl site)
« Reply #10 on: 18 Apr 2006, 13:58 »
Not sure I understand the question: the Credits are displayed using Text Overlays and shouldn't be affected by any custom textboxes (I assume you mean one used for the Display() function).

Can you give a screenshot or source code of the issue?

The_Creep

  • Later...in the emergency room
Re: MODULE: Credits v1.13 (new dl site)
« Reply #11 on: 18 Apr 2006, 15:39 »
Yup, the one used for Display(); I have since come across the source of the problem, my game 's speech style is set to "Sierra Style with Background" if I turn  this to just plain sierra style, or lucasarts, it works perfectly,  but I would really like to keep my style as it is and have my credits, so if you can think of a workaround let me know :)

I will post screenshots shortly, and as for the sourcecode, I copy pasted the example from the readme, so there should not be any errors there.

Edit:

Fixed it!

The problem WAS the speech style,  (Sierra with Background), for some reasons dumps the custom textbox behind the credits (and distorts it).

So I just put

SetSpeechStyle(Lucasarts);
*Your credits code here*

then when the Credits returned the value that they were finished I just set the style back with:

SetSpeechStyle(eSpeechSierraWithBackground);

Thanks again for an excellent module!

Edit 2:

ey, sorry I know I'm being a pest, and I know I will kick myself when I see the solution

I want to make it so that the player can click the mouse or press esc to end the credit sequence, but I'm damned if I can figure out how, what I have done is filled the room with hotspot1, and said that anyclick will move player to room1, but the game crashes out and gives me the error message: Invalid Overlay ID specified. so obviosly before I change rooms, I need to tell the credits that they are finished, and to cease and desist, how I would I do this? I'm sure its a similar piece of code to the one you put in the repeatedly_execute room, but I just cant figure it out.
« Last Edit: 18 Apr 2006, 19:04 by strazer »
If you had nothing left, would you risk it all to change everything?

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.13
« Reply #12 on: 18 Apr 2006, 17:32 »
1) Don't triple-post: edit your previous entries
2) No, actually, there isn't currently a way to do this! I need to add some code to the module for this and I will try and do this ASAP: watch this space!
3) Please make a thread in Tech Forum reporting the bug you found with that speech mode!

EDIT:
Well, actually, you could use the SkipCutscene thing to zip through it and then chnage, I guess...

However, I've now updated the module to have a Stop function for just this case. Thanks for pointing out this deficiency!
« Last Edit: 18 Apr 2006, 21:23 by SSH »

Alynn

  • I'm ugly because I'm pixelated, what's your excuse
    • I can help with scripting
    •  
Credits 1.14 (nevermind SSH issue)
« Reply #13 on: 16 Jul 2006, 13:26 »
Sorry, after playing around for a bit it's something with SSH's code, it seems that using the [ character at the end of a Title or Credit that has a StarTransition of simple never disappears, but any other kind of start transition it will display that line and the next line.

There also seems to be an issue with scrolling from top.

Sorry I've just been working on this thing for hours now and I was getting frustrated...

Edit:
Ok code snippet
Code: Adventure Game Studio
  1. //Credits[0].DefaultTitleStartTransition = eSlideTop;
  2.  
  3. Credits[0].addTitle("A Game By[");
  4. Credits[0].addCredit("Yellow Eyed Studio");
  5.  

Note: Doing this from memory, so the eSlide may be wrong. but that's the general idea of the code. The only Credits code above the first line I posted was the default font settings and default color settings.

Leaving the comment in the credits will start displaying "A Game By" in the correct font, howver that font will never leave and the rest of the credits will never run.

If you remove the comment it will work, but not as expected. There is a brief flash of the Title line in the center of the screen, then it will appear in the correct location, the credit text appears as well. Both are then removed correctly.

Any other DefaultStartTransition and it will work as expected. With the text scrolling in from the sides or the bottom. The issues seem to stem about removing the text with there is a [ present at the end of the string, and with top down sliding.

What I am shooting for is this
    A Game By
Yellow Eyed Studio

That appears at the same time, both go away and the next title and credit are displayed. From what I thought putting [ at the end of the title line, and setting both start and end transitions to simple (which is the default so I never actually set them).

Yet another edit...
Suggestion: Is there any way to center the text when using a breakline? IE "Adventure Game Studio[by Chris Jones". Currently it shows text as
Code: Adventure Game Studio
  1. Adventure Game Studio
  2. by Chris Jones

What I would like to see is
Code: Adventure Game Studio
  1. Adventure Game Studio
  2.    by Chris Jones
« Last Edit: 17 Jul 2006, 12:58 by Alynn »

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.16
« Reply #14 on: 26 Jul 2006, 08:08 »
Top slide is definately fixed now. And the simple credits with a [ works in the demo included in the zip file...

Alynn

  • I'm ugly because I'm pixelated, what's your excuse
    • I can help with scripting
    •  
Re: MODULE: Credits v1.16
« Reply #15 on: 26 Jul 2006, 19:37 »
Ok now it werkies for me... After commenting out all of your debug label code you left in :P

Now that that is setup, could you perhaps add functionality that only removes a Credit if another Credits is up, and only gets rid of titles if a new title is to be loaded...

What I'm looking for is the title text to be static, while the credits for that particular title scroll from the left pause briefly under the title and then scroll right, the title only scrolling off after the last  credit for that title has passed.

For an example haveing both the credits and the titles slide from the left, and slide out to the right.

Credits[0].setTitle("In association with:");
Credits[0].setCredit("Skytower Games");
Credits[0].setCredit("twIg");

In association with: and Skytowergames would slide in together, Skytower Games would slide out twIg will slide in, and then both Title and Credit will slide out at the same time...

I know I know it's probably easier said than done, but I've looked over your code, and the complete lack of any kind of comments makes it cryptic to decipher :P. Since Obviously I couldn't see what the origional problem was with static creds and all that...

Anyway if you can't add that it's not a huge deal, but thanks for your work getting the rest up and running.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.16
« Reply #16 on: 27 Jul 2006, 12:27 »
Well, I've got something that might work for you... now you can keep credits on screen by putting any of a set of user-defined characters at the end of the line, and putting the same character at the beginning of the line will clear any old lines with that character on.

So, if you download the zip and look at the included "game" you'll see how it works, I hope. And the debug code should get automatically left out, too ;)

Credits module error
« Reply #17 on: 11 Oct 2006, 03:19 »
When I try to run the credits module i get an error saying "x is a global var; cannot use as a name for local."

Edit:

Thanks KhrisMUC, I've found a global variable called x and renamed it. It's fixed!
« Last Edit: 19 Mar 2007, 21:44 by strazer »



Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: Credits module error
« Reply #18 on: 11 Oct 2006, 03:21 »
Are you using a variable called "x" in any of your functions or even as a global variable?
If you need it, rename it, if not, find the line where it says "int x;" and remove it.

Are you using another plugin or a module perhaps? Anything else that might use a variable called x?

If not, check if the module supports your version of AGS.
« Last Edit: 19 Mar 2007, 21:44 by strazer »

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.18
« Reply #19 on: 16 Feb 2007, 13:22 »
v1.18 is up to fix a translation-related problem that Cinfa found.

Candle

  • Truly Hated
Re: MODULE: Credits v1.18
« Reply #20 on: 10 Mar 2007, 03:45 »
Whats the limit on overlays on one screen? I'm getting a to many overlays error then it crashes on me.
about 19 lines in the credits. more or less one or two.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.18
« Reply #21 on: 10 Mar 2007, 08:27 »
I'm afraid that's an AGS limit (around 20 or so), so you'll just have to have fewer credits onscreen at once: increase the spacing or make font bigger

Re: MODULE: Credits v1.18
« Reply #22 on: 20 Aug 2007, 13:29 »
Hey Ive got another problem with this module. When I try to run the game it says "Local variable cannot have the same name as an import" On this line of script:
Code: Adventure Game Studio
  1.         int n=this.find_free();
By the way im using the beta version of ags 2.8.



SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.18
« Reply #23 on: 21 Aug 2007, 08:10 »
Are you using another module that declares a global n and exports it? Change one or the other..

Re: MODULE: Credits v1.18
« Reply #24 on: 30 Aug 2007, 15:10 »
I want to share something:

I am using the Credits module for the end game credits and the 'About' section of my game. When the credits were run more than once, it would give the "Credit Module has reached maximum 100 lines, contact game author and tell them to increase CREDIT_MAX_LINES" error.

I have changed the main module codes from
Code: Adventure Game Studio
  1. if (i==CREDIT_MAX_LINES)
  2.  Display("Credit Module has reached maximum %d lines, contact game author and tell them to increase CREDIT_MAX_LINES", CREDIT_MAX_LINES);
  3. else return i;
  4.  
into
Code: Adventure Game Studio
  1. if (i==CREDIT_MAX_LINES)
  2. i=0;
  3. else return i;
  4.  

So the 'i' variable gets reseted.
I am not doing something wrong, am I?

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.18
« Reply #25 on: 30 Aug 2007, 15:39 »
Yeah, there seems to be a problem with trying to run the Credits more than once.

Could you try doing a Credits[0].Reset(0) before you run the second time?

the number passed to Reset must match the first number, so it would be: Credits[1].Reset(1) or Credits[2].Reset(2)


Re: MODULE: Credits v1.18
« Reply #26 on: 30 Aug 2007, 16:04 »
Now I changed the main code into the original one

(the
Code: Adventure Game Studio
  1. if (i==CREDIT_MAX_LINES)
  2.  Display("Credit Module has reached maximum %d lines, contact game author and tell them to increase CREDIT_MAX_LINES", CREDIT_MAX_LINES);
  3. else return i;
  4.  
)  and used the Credits[0].Reset(0); for both the hotspot that makes the player leave and the credit ending codes on repeatedly_execute; but it still gave the same error for me. And I am sure Credits[0].Reset(0); is for the correct credits (Credits[0]).

But when I changed the main module code into
Code: Adventure Game Studio
  1. if (i==CREDIT_MAX_LINES)
  2. i=0;
  3. else return i;
, it began to run successfully again. The credit screen can be run multiple times now with my codes.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.18
« Reply #27 on: 30 Aug 2007, 17:32 »
The problem is that you are adding the credits twice. You should only use Credits[0].Run() twice and all the Credits[0].AddTitle etc. once.

headphone

    • I can help with making music
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
Re: MODULE: Credits v1.19
« Reply #28 on: 28 Oct 2007, 23:01 »
Hey sorry to bump such an old topic, but I'm having a lot of trouble with this module and there doesn't seem to be anywhere around where I can find the answers. I've looked at the demo game and I've read the documentation but I can't find anywhere that explains how I set the speed of my credits.

I'm using the eCreditTypewriter thing and it displays everything so fast it is barely readable. I would like it to display a lot slower and to pause between the displaying of each credit. The only two things I found were Credits.Pause() which I don't know how to use properly at all. If I insert it as it is nothing happens and if I put something in the brackets like a number then I get an error message. Nowhere in the documentation does it really explain how to use the commands, it just lists them so it is pretty hard for someone who is new to AGS like me.

And the other command was the Credit[n].Delay which apparently controls the speed of the scrolling but 1. I am using the static typewriter and 2. no matter what value I set it still blitzes all the text off faster than you can read it.

Can anyone help?
« Last Edit: 28 Oct 2007, 23:03 by headphone »

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #29 on: 29 Oct 2007, 11:25 »
My bad, I haven't documented the speed controls for Typewriter mode properly:

Credits[n].TypeDelay set the delay between individual characters of the typing and
Credits[n].TypeRandom can be set to give a random element to the above delay to make it more "realistic".

There's also SpaceSound, TypeSound and EOLSound which can be set to sound numbers for the space bar, normal keys and End of Line "ding" for the typewriter.

I'll try and go through all these settings and make sure they're properly documented soon.

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: Credits v1.19
« Reply #30 on: 29 Oct 2007, 11:28 »
Your module does all that? Nice work, it's more than it says on the label. It stands as a "typewriter module" on its own.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Re: MODULE: Credits v1.19
« Reply #31 on: 10 Dec 2007, 19:59 »
HI

if my credit is something like " ags"

first time it show
ags

second time it show
ags
ags

third time
ags
ags
ags

etc..
 
i try
Credits[0].Reset(0);
at the beginning of the script but it dont works.
Any idea?
 

Thanks                             

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #32 on: 10 Dec 2007, 20:21 »
Let me guess: do you re-add the credits when you run them again? It the same problem Gord10 had...

Re: MODULE: Credits v1.19
« Reply #33 on: 10 Dec 2007, 21:38 »
ok i solve the problem with globalint


#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
// script for Room: Player enters room (after fadein)

if(getglobalint(1) ==0)
   {
    credit stuff
    ...
    SetGlobalInt(1,1);
    }

Credits[0].Run();

}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE



thanks


« Last Edit: 10 Dec 2007, 22:05 by riseryn »

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #34 on: 10 Dec 2007, 22:05 »
Put the code to RUN the credits there. Put the code to ADD the criedts in game_start or in the first time player enters room, so it only gets run once.

Re: MODULE: Credits v1.19
« Reply #35 on: 10 Dec 2007, 22:06 »
ok your solution is better  :)

re thanks  :)

Re: MODULE: Credits v1.19
« Reply #36 on: 09 Feb 2008, 04:21 »
Since I haven't been able to find detailed explanation of the typewriter settings, I'll ask my questions here so everyone can learn.

Basically, I can't make heads or tails of it. Check out this script I've whipped up:
Code: Adventure Game Studio
  1. function room_AfterFadeIn()
  2. {
  3. Credits[0].CreditStyle=eCreditTypewriter;
  4. Credits[0].DefaultCreditFont=3;
  5. Credits[0].DefaultCreditColour=15;
  6. Credits[0].TypeDelay=10;
  7. Credits[0].AddCredit("Hello[[this is the credits module[[goodbye");
  8. Credits[0].Run();
  9. }

All it does is scroll the text upwards like normal credits, it doesn't do the typrewriter thing. I don't get it. I could use a how-to.

Thanks
"Marge, it takes two to lie. One to lie, and one to listen."

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #37 on: 10 Feb 2008, 22:53 »
You need to set CreditStyle to eCreditStatic and set DefaultCreditStartTransition and DefaultTitleStartTransition to eCreditTypewriter

Re: MODULE: Credits v1.19
« Reply #38 on: 11 Feb 2008, 04:12 »
Okay thanks, that worked. I didn't bother with the Title command though, because I'm not using it.

What's the difference between the titles and credits anyway?

But my real question is this: Seeing as the JumpToRoomAtEnd does not work when the message has a "[" at the end of it, how can I keep the message onscreen and only change the room when the player has clicked anywhere on the screen?
"Marge, it takes two to lie. One to lie, and one to listen."

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #39 on: 11 Feb 2008, 09:52 »
Check for Credits[n].IsRunning() in repeatedly_execute and then when it stops being true, run your end-code.

paolo

  • This City at Night Demo - while stocks last!
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • paolo worked on a game that was nominated for an AGS Award!
Hm, I'm not sure whether this should go here or in the modules forum, or whether I should just contact SSH directly, but anyhow...

So, I'm using SSH's credits module, and two things aren't working as I want them to.

1. The first thing in the credits is an image, and I'd like this to stay fixed in position for a second or two before scrolling up to show the rest of the credits. Is it possible to do this within the credits module, or do I need to script this separately (which shouldn't be too hard to do). If I have to do it myself, then how do I get the credits to pause for a certain time before starting?

2. When my credits come up, all of the text appears in boxes of solid colour. It looks like these boxes are the GUI I am using for the text displayed when I use the "Think" command, but if I set the game not to use this GUI for Think before displaying the credits, the boxes still appear.

Can anyone help? Thanks.
« Last Edit: 03 May 2009, 13:22 by paolo »
url=http://www.adventuregamestudio.co.uk/site/games/game/2036/]This City at Night - Demo[/url]

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Module problems are usually best in the module thread, I think, then anyone else with the same problem can find it easily. But anyway:

1. I think is probably easier done separately.

2. Can you upload an example game, or ideally your who game dir (you can send it to me in PM if you prefer)

paolo

  • This City at Night Demo - while stocks last!
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • paolo worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #42 on: 20 May 2009, 09:25 »
I found out what the problem was in the end - the credits use the speech GUI (GUI number 3) and I had modified this. I changed it to use an invisible sprite, and now everything works fine.
url=http://www.adventuregamestudio.co.uk/site/games/game/2036/]This City at Night - Demo[/url]

Re: MODULE: Credits v1.19
« Reply #43 on: 01 Aug 2009, 03:54 »
Using Credits Module v1.19 with AGS 3.2 Beta 2 and had to make a few changes to "credits.asc" to get it to work:

changed
this.fontimage[ln]

to
eFontNormal

Not sure if this is proper or if I changes the intent of the code but it compiles without error.

The problem I am having is that each title/credit has a white bar under the text.

Any idea how to make it transparent?

Joe

  • Anywhere you think I am, I am
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: MODULE: Credits v1.19
« Reply #44 on: 13 Aug 2009, 11:27 »
Broken link?

EDIT: Nevermind, I downloaded it from your website
Copinstar © Oficial Site

Re: MODULE: Credits v1.19
« Reply #45 on: 31 Aug 2011, 14:46 »
With CreditStyle eCreditStatic and eCreditCentered, the credit text doesn't appear to be centered properly in the x-axis.  The game's resolution is 800x600. Is this related to the use of GetTextWidth, which apparently returns the width in 320-resolution pixels, or some other problem?  Is there a fix?  Thanks.
« Last Edit: 31 Aug 2011, 17:35 by pcj »
Space Quest: Vohaul Strikes Back is now available to download!

Re: MODULE: Credits v1.19
« Reply #46 on: 25 Apr 2015, 05:07 »
Hi all, I guess I'm bringing up an old topic, but that's what us newbies do. I was looking for a way to easily add credits at the end of a game. This module seemed like the answer, but the link is broken. Maybe somebody has this laying around. :-D
completed: Beyond Eternity

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #47 on: 25 Apr 2015, 16:38 »

Re: MODULE: Credits v1.19
« Reply #48 on: 02 Jun 2015, 22:05 »
Thanks for the Link  :)
_______________________________________ ____________________

Re: MODULE: Credits v1.19
« Reply #49 on: 31 Oct 2015, 07:11 »
Sorry for digging up this topic, but is there a way of displaying credits in more than one column? I tried something like this:
Code: Adventure Game Studio
  1. Credits[0].AddCredit("line 1",30);
  2. Credits[0].AddCredit("line 2",300);
This makes the two lines appear at the same time, but "line 2" one line lower than "line 1", not on the same level like I want it to.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #50 on: 27 May 2016, 13:21 »
Uhm... I was going to use this module for my MAGS game, but all the links to it seem to be broken. :~(

Anyone has a new & working link to it?
There are those who believe that life here began out there...


Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #52 on: 27 May 2016, 20:27 »
Thank you! (nod)

EDIT: Crap! How do I remove the background from the text?!
I'm using Sierra With Background style and have a background text gui, and it's using that one. :(
I just want a transparent BG and the text scrolling, with the color I wish (it's also using the color of the Speech text gui).

I can't find anything setting in the module that is referring to speech or gui (even just searching for the gui number doesn't help) that is relevant. :/

EDIT 2:
Okay! For others that may have the same problem:
I created a new Text Window GUI, made the BG color 0 and all the 8 borders to a dummy invisible sprite.
Then added the following line just before running the credits:
Code: Adventure Game Studio
  1. game.speech_text_gui=x; // replace the x with your new dummy GUI.
  2.  
Problem solved. :-D Remember to change it back to your normal GUI after the credits are over.

PS - The PlaySound gives an error (using 3.4.07) I just commented the 4 lines out.
« Last Edit: 27 May 2016, 21:29 by Cassiebsg »
There are those who believe that life here began out there...

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #53 on: 27 May 2016, 22:16 »
PS - The PlaySound gives an error (using 3.4.07) I just commented the 4 lines out.
What error?

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #54 on: 27 May 2016, 22:30 »
Okay, had to create a new project and import the module, to be sure... (roll)

Undefined token 'PlaySound'
There are those who believe that life here began out there...

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #55 on: 27 May 2016, 23:48 »
Okay, had to create a new project and import the module, to be sure... (roll)

Undefined token 'PlaySound'

This is because PlaySound is a deprecated function. To enable it you need to turn "Enforce new Audio scripting" off in the Backwards-compatibility settings of your project.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #56 on: 28 May 2016, 01:02 »
Okay, thanks for the info CW, will be handy if I decide to use it.
There are those who believe that life here began out there...

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #57 on: 15 Oct 2017, 19:52 »
Okay, me again with a new old problem...

I need to add the credits more than once! 8-0 Is there a way to clear the array(?), so I can then add them again?

Reason for this, is that I decided to add an option to let the player change translations in game, not just via winsetup, and since the Credits are being loaded at Game_Startup, this is not working desirable. :-\ So ideally, I would like to reset/clear them and then add them again in the the proper language, so that they display correctly.

Is this possible?

EDIT: I solved my "problem" without needing to clear the credits, but there's still a problem when using a translation. Which might have been solved with a clear command. (wtf)

Anyway, right now the problem only happens when I load the game with a translation selected and I then wish to return to the default (english) language. If I change it from the games settings GUI (not winsetup), the credits are still displayed in the original translated language. ???
This problem does not happen when I  start the game with the default language selected, I then have no problem changing the text in game from one language to the other and back and the credits will be displayed in the current "selected language".

Any idea why it might be messing up when I start the game in another language? ???
« Last Edit: 18 Oct 2017, 15:14 by Cassiebsg »
There are those who believe that life here began out there...

Nishuthan

  • Peace
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: Credits v1.19
« Reply #58 on: 27 Oct 2017, 06:34 »
I cant download the plugin Help

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #59 on: 27 Oct 2017, 17:52 »
If you go 7 posts up, you'll find the link... but I'll make it easier for you: http://www.adventuregamestudio.co.uk/forums/index.php?topic=28659.msg636536414#msg636536414
There are those who believe that life here began out there...

Nishuthan

  • Peace
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: Credits v1.19
« Reply #60 on: 29 Oct 2017, 10:54 »
Thanks

Nishuthan

  • Peace
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: Credits v1.19
« Reply #61 on: 29 Oct 2017, 11:06 »
I have a Error I'm using AGS 3.4.0.
The Error is  "Credits.asc(80): Error (line 80): Undefined token 'StrCopy' "
How do i correct it ?

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: MODULE: Credits v1.19
« Reply #62 on: 29 Oct 2017, 12:07 »
The Error is  "Credits.asc(80): Error (line 80): Undefined token 'StrCopy' "

StrCopy is an obsolete function which works with old-style AGS strings, it has been abandoned like 10 years ago.

Looks like this module may use an upgrade...

As the last resort, if there is no modern version of this module, go to the General Settings page in the editor, find "Backwards Compatibility" section and set "Enforce new-style strings" to FALSE.
« Last Edit: 29 Oct 2017, 12:09 by Crimson Wizard »

arj0n

  • Mittens Vassal
  • art consists in drawing a line somewhere
    • arj0n worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #63 on: 29 Oct 2017, 13:14 »
@Nishuthan:
You're using the credits module v1.17 or older (which does contain the - as Crimson Wizard said - obsolete StrCopy).
Download v1.19 here, which works fine.

With v1.19 you might bump into an Undefined token 'PlaySound' error though.
I just quote the solution to this, as stated by Crimson Wizard earlier in this thread:
"this is because PlaySound is a deprecated function. To enable it you need to turn "Enforce new Audio scripting" off in the Backwards-compatibility settings of your project."

Re: MODULE: Credits v1.19
« Reply #64 on: 25 Jan 2018, 02:13 »
I'm still fairly new to using AGS so it's possible I'm simply missing something obvious here... even after importing the main script directly copying the room script from the example game into the room script of my own game, no credits appear when I'm in that room... no errors appear either, so I've no clue as to what I'm doing wrong, exactly.

arj0n

  • Mittens Vassal
  • art consists in drawing a line somewhere
    • arj0n worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #65 on: 25 Jan 2018, 23:54 »
@Lurdiak:

Here's 2 examples:

Scrolling example:
Code: Adventure Game Studio
  1. Credits[0].DefaultCreditColour=15;
  2. Credits[0].DefaultCreditFont=2;
  3. Credits[0].DefaultCreditX=eCreditCentred;
  4.  
  5. Credits[0].DefaultTitleColour=3;
  6. Credits[0].DefaultTitleFont=0;
  7. Credits[0].DefaultTitleX=eCreditCentred;
  8.  
  9. Credits[0].CreditStyle=eCreditScrolling;
  10.  
  11. Credits[0].DefaultCreditStartTransition=eCreditScrolling;
  12. Credits[0].DefaultTitleStartTransition=eCreditScrolling;
  13. Credits[0].TypeDelay=2;
  14.  
  15. Credits[0].AddTitle("Programming by:");
  16. Credits[0].AddCredit("name1[[name3[[name3");
  17. Credits[0].AddTitle("Testing by:");
  18. Credits[0].AddCredit("name1[[name2[[name3");
  19. Credits[0].Run();
  20.  

Typing example:
Code: Adventure Game Studio
  1. Credits[0].DefaultCreditColour=15;
  2. Credits[0].DefaultCreditFont=2;
  3. Credits[0].DefaultCreditX=eCreditCentred;
  4.  
  5. Credits[0].DefaultTitleColour=3;
  6. Credits[0].DefaultTitleFont=0;
  7. Credits[0].DefaultTitleX=eCreditCentred;
  8.  
  9. Credits[0].CreditStyle=eCreditStatic;
  10.  
  11. Credits[0].DefaultCreditStartTransition=eCreditTypewriter;
  12. Credits[0].DefaultTitleStartTransition=eCreditTypewriter;
  13. Credits[0].TypeDelay=2;
  14.  
  15. Credits[0].AddTitle("Programming by:");
  16. Credits[0].AddCredit("name1[[name3[[name3");
  17. Credits[0].AddTitle("Testing by:");
  18. Credits[0].AddCredit("name1[[name2[[name3");
  19. Credits[0].Run();
  20.  

Re: MODULE: Credits v1.19
« Reply #66 on: 26 Jan 2018, 01:18 »
Those certainly are examples, but it doesn't help me understand how I'm supposed to use the code at all.

arj0n

  • Mittens Vassal
  • art consists in drawing a line somewhere
    • arj0n worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #67 on: 26 Jan 2018, 01:30 »
works fine when placing it in the room_AfterFadeIn function

Re: MODULE: Credits v1.19
« Reply #68 on: 26 Jan 2018, 02:28 »
Ah, I see. So if the room script is

Code: Adventure Game Studio
  1. function room_AfterFadeIn()
  2. {
  3.       Credits[0].DefaultCreditColour=15;
  4.     Credits[0].DefaultCreditFont=2;
  5.     Credits[0].DefaultCreditX=eCreditCentred;
  6.      
  7.     Credits[0].DefaultTitleColour=3;
  8.     Credits[0].DefaultTitleFont=0;
  9.     Credits[0].DefaultTitleX=eCreditCentred;
  10.      
  11.     Credits[0].CreditStyle=eCreditScrolling;
  12.      
  13.     Credits[0].DefaultCreditStartTransition=eCreditScrolling;
  14.     Credits[0].DefaultTitleStartTransition=eCreditScrolling;
  15.     Credits[0].TypeDelay=2;
  16.      
  17.     Credits[0].AddTitle("Programming by:");
  18.     Credits[0].AddCredit("name1[[name3[[name3");
  19.     Credits[0].AddTitle("Testing by:");
  20.     Credits[0].AddCredit("name1[[name2[[name3");
  21.     Credits[0].Run();
  22.      
  23. }

I should be seeing the default credits scrolling in as soon as I enter it?

arj0n

  • Mittens Vassal
  • art consists in drawing a line somewhere
    • arj0n worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #69 on: 26 Jan 2018, 10:21 »
Yes, sir.

Re: MODULE: Credits v1.19
« Reply #70 on: 26 Jan 2018, 16:38 »
It still isn't working for some reason. :(

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: MODULE: Credits v1.19
« Reply #71 on: 26 Jan 2018, 17:22 »
Make sure that you have LINKed the event in the editor, and did not just copy/pasted "function room_AfterFadeIn()" into the script (it won't work!).
There are those who believe that life here began out there...