intro sequence, how to (problem with Creditz plugin)

Started by deftonesrule, Mon 15/05/2006 15:37:14

Previous topic - Next topic

deftonesrule

hey guys.

i made a menu as my room1 and that has a hotspot called New Game, when you click on it i want the workflow to do the following:

open room4 which has my pretty background, and start displaying text, it would be like reading a diary entry then you click on a hotspot in the corner and then it displays the next diary entry.

I'm guessing it should be a good idea to keep it all in room4 to keep my room numbers down. I simply dont know how to add text or make it start displaying on its own without having tho click a hotspot for it, like have it fade in with the first paragraph of text displaying.

candle suggested i use the creditz plugin but for some reason, neither he nor i was able to get it to work.. heres the error message on that.. :

---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was:

In: 'Plugin definitions'



Error (line 3): PE03: Parse error at 'sequence'



Do you want to fix the script now? (Your game has not been saved).
---------------------------
Yes   No   
---------------------------


... then it opens the scirpt pad thingy which has the following:

line1 // room script file
line2



thats it. it wont let me save at this point, i get the above error. any enlightenment would be highly appreciated!

Ishmael

You're not making a 300 room game, are you? You could very well use a room with the text in the background for each if all else fails.

But if you're so worried about the room count, you can use a GUI. Just use the GUI transparency function and a while loop to fade the text in and out, and while the GUI is completely transparent change the text.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Ashen

Are you using the Creditz plugin (I'm not sure how compatable that is with the newer versions of AGS), or the Credits module? That error sounds like it might be a problem with the plugin itself (or maybe how you've set it up), but I'll have to leave that for someone more familiar with the plugin/module.

On a more general note:
Quote
I simply dont know how to add text or make it start displaying on its own without having tho click a hotspot for it, like have it fade in with the first paragraph of text displaying.

Putting the code in the 'Player enters screen (after fadein)' interaction should do it. (See also the BAFQ Entry Placing your code.)
I know what you're thinking ... Don't think that.

deftonesrule

#3
would that also pertain if i turned the room into a first person ? its running in 800x600. i wish it could be higher, ill try to educate myself on those things but i dont know anything about coding =0(

using the crediz plugin btw

A�rendyll (formerly Yurina)

Maybe you should check for which AGS version the plugin is made, and which AGS version you are using. Since version 2.7 of AGS the coding changed a lot, so that may be causing problems.

Try to use the module instead, if this is the problem.

~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

deftonesrule

so far,  i clicked on the i , in room editor / settings, then picked the player enters room after fade in, but dont see any action for displaying text...

so i choose run script.. then edit script.
so far my script looks like this :

line 1  // script for Room: Player enters room (after fadein)
line 2
line 3

--------
what the freak do i do now? i dont know scripting systax or whatever, and the tutorials and help docs are confusing to me.


if i close that editor and go back to the room editor / settings and click on abc, it displays this :

// room script file


#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
  // script for Room: Player enters room (after fadein)
 
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE
---------------------------------
i have no idea which to edit or how to place it or what.... ive given up on the creditz thingy for now... =(

HELP!!!!

Ashen

Quotei clicked on the i , in room editor / settings, then picked the player enters room after fade in, but dont see any action for displaying text...

Scroll down the list - 'Game - Display a message'. However, that might be a bit bbasic for what you want, so choose 'Run script' instead (from the next bit, it looks like you've already done that).

Quoteif i close that editor and go back to the room editor / settings and click on abc, it displays this

The 'ABC' button should actually open the room message editor window, which you really only need to worry about if you use 'Game - Display a message'. The '{}' button is the one that opens the script, or you can use Ctrl-E. (This isn't really relevant right now, I'm just pointing it out for clarity.)

Once you get into the script, anything you put between the { and the } of room_a() will be run immediately after the fade in. So, for example:

Code: ags

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
  // script for Room: Player enters room (after fadein)
  Display ("This is the first thing you will see.");
  Display ("This is the second");
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE


Will display the first line then after a pause (or when the player clicks to clear it), display the second line.

What exactly you put there depends on what you want to happen. You could use Display commands as shown, you could use Objects or Characters to have the credits fading in/out or moving around, you could use Background Frames, you might even figure out how to get the Creditz thing working after all.
Try reading through the manual to see what the commands do and figuring it our for yourself, or if you want help to do something specific (and can't find out how by searching the forums) ask, but BE SPECIFIC. (Vague "how do I make an Intro" questions usually just get directed to the BFAQ.)

Also, as Yurina-chan suggested try using the Credits Module, rather than the plugin, as the module should definately run with the newest versions of AGS. (Requires V2.71)
I know what you're thinking ... Don't think that.

deftonesrule

OH fantastic ashen !!!

on a relevant note, i imported a font into ags.

1. how do i make this text use this font,....

2. how do i change the way the text is displayed ?
        a. it shows the text with white bg and black lettering, id rather have invisble bg (to see the bg image) and white letters with my imported font.

3. also clicking is great but id want the player to click on a button and have it display for infinity untill that button is pushed.

... imagine if you will a diary being read ...

Monday, May 15 2006
Finaly the torture is over. Special Forces members rescued me from a hospital in the middle of nowhere. Altough I made it out alive, some of the Special Forces members lost thier lives while waiting for airlift extraction. I would rather have let them kill me then kill these young heros who came to save me.

                                                                                   <button> (perhaps animated?)

...clicking the button takes you to the next diary entry...

Saturday, May 20 2006
I guess I've been getting called VIP. I guess because I'm the only one who knows how to operate the new anti missile defensive systems, We're all save now but the Special Forces guys are on edge. I wonder if something is going on that I'm not aware of. I hope I never have to kill anymore, maybe its time to retire.

<button> (perhaps animated?)

2 more pages...  then the gameplay starts..

so... how .... lol ?

Ashen

1.
SetNormalFont

2.
See the manual entry Customised Text Windows. That's the general answer at least, however:

3. (This is why it pays to be specific ...)
For what you want you're probably better using a GUI, as Ishmael suggested. Make a GUI, set it's size and position and set it's background colour to 0, to make it appear transparent in-game. Add a Label object to display text and a button object, and give them both Script names.
You'll probably want to use a variable to store which 'page' is being displayed, and react accordingly (display next page, or turn GUI off and start the game proper).
(For more details on making GUIs, do a forum search. For more info on variables, ditto - or try the BFAQ.)

All you need to do in the 'Player enters room' interaction isset the initial page's text (although you could do that in the editor, and turn the GUI on. Oh, and you may need to know that the '[' character acts as a line break, so "Monday, May 15 2006[Finaly the torture is over." should display as:

Monday, May 15 2006
Finaly the torture is over.
I know what you're thinking ... Don't think that.

deftonesrule

thank you so much for the very helpful information. i will try to digest this and master it before i move on. ill post a dl from what i have so far when i get this going =)

thanks again!

deftonesrule

got it to work!

ill tell you what u did to get it going:

in the player enters room code i used the display code to have 4 different messages appear then after you finish reading it loads into room 6 which is the first playable part of the game.

i made a gui with a bg color of 0 and imported a 1x1 pixel in .png format as a sprite and made the top left pixel transparent. this is so i can get rif of the tileing coffee cup. ( thanks for the advice various people in irc).

now ill be working on inventory and other things. so for now ill consider this issued resolved =)

SMF spam blocked by CleanTalk