MODULE: Credits v1.19

Started by SSH, Thu 22/09/2005 16:22:54

Previous topic - Next topic

Candle

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

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
12

joelphilippage

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: ags
	int n=this.find_free();

By the way im using the beta version of ags 2.8.



SSH

Are you using another module that declares a global n and exports it? Change one or the other..
12

Gord10

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: ags

if (i==CREDIT_MAX_LINES)
 Display("Credit Module has reached maximum %d lines, contact game author and tell them to increase CREDIT_MAX_LINES", CREDIT_MAX_LINES);
else return i;

into
Code: ags

if (i==CREDIT_MAX_LINES)
i=0;
else return i;


So the 'i' variable gets reseted.
I am not doing something wrong, am I?
Games are art!
My horror game, Self

SSH

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)

12

Gord10

Now I changed the main code into the original one

(the
Code: ags

if (i==CREDIT_MAX_LINES)
 Display("Credit Module has reached maximum %d lines, contact game author and tell them to increase CREDIT_MAX_LINES", CREDIT_MAX_LINES);
else return i;

)  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: ags
if (i==CREDIT_MAX_LINES)
i=0;
else return i;

, it began to run successfully again. The credit screen can be run multiple times now with my codes.
Games are art!
My horror game, Self

SSH

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.
12

headphone

#28
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?

SSH

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.
12

Rui 'Trovatore' Pires

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.

riseryn

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

Let me guess: do you re-add the credits when you run them again? It the same problem Gord10 had...
12

riseryn

#33
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



SSH

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.
12

riseryn

ok your solution is better  :)

re thanks  :)

AntmanJB

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: ags
function room_AfterFadeIn()
{
Credits[0].CreditStyle=eCreditTypewriter;
Credits[0].DefaultCreditFont=3;
Credits[0].DefaultCreditColour=15;
Credits[0].TypeDelay=10;
Credits[0].AddCredit("Hello[[this is the credits module[[goodbye");
Credits[0].Run();
}


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

You need to set CreditStyle to eCreditStatic and set DefaultCreditStartTransition and DefaultTitleStartTransition to eCreditTypewriter
12

AntmanJB

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

Check for Credits[n].IsRunning() in repeatedly_execute and then when it stops being true, run your end-code.
12

SMF spam blocked by CleanTalk