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

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.