I'm having a hard time displaying text and pictures.

Started by Tentacles, Mon 15/03/2010 15:33:07

Previous topic - Next topic

monkey0506

Tentacles, not to be rude, but honestly you can't accuse me of misreading what you said because you didn't actually say anything. Saying "it doesn't work" gives absolutely no indication what is happening.

In order for us to be able to help you we are going to have to know what is going on. If the text is not displaying but everything else seems to be functioning normally, say so, not just that it isn't working. If you're getting any type of error message, which I understand you said you are not, but if you were, then you should tell us not just that you are getting an error, but what it says.

In retrospect regarding my post about the scope with that Wait statement the Overlay* would still have scope for approximately 7.5 seconds at normal game speed which should be plenty of time for you to see the text, so I may have been talking a bit of bullocks as to why it wasn't showing up. That said however, I was correct that the code is completely valid.

Regarding the events pane, as has been said, this is one of the most basic steps to working with the AGS 3 editor (comprising all versions of AGS 3.0 and higher to date, up to 3.2 RC 3). Seeing as this is a room function you will need to open the room for editing (as you would to draw walkable areas and such, but don't display any of these, just let it display the room background only, "Nothing"). By default your project tree and such will be along the right-hand side of the editor. If you have moved it to the left then you will need to take that into consideration for the information that follows.

In the bottom right-hand quadrant of the editor window you should have the Properties pane. This is where you can set various different properties of the item currently displayed in the active tab. If you look just above the Properties pane you should see a lightning bolt-shaped icon. Click on this. This brings you to the Events pane.

For each event listed in the Events pane there is a text box associated with it. You can either type in a function name manually, or you can click the ellipses (...) button which will attempt to automatically create the function with the default name.

Please note that when you are putting anything in these text boxes, you will only use the function name. This is particularly important if you ever need to link a function that requires parameters. You can't just link whatever function you want though because the function must have the same parameters, including the number and types of those parameters, in order for the function to be properly linked. The "Player enters room (after fade-in)" event gets linked to a function just like yours with no parameters at all. So if you want to "properly link" your event handler (your function) to the event itself so the function will actually be called, then you need to type into the appropriate text box "room_AfterFadeIn" (without the quotes around it. Do not include any parenthesis, braces, or otherwise, just the name of the function.

Once this is done, with the code that has been provided, you will see the text.

Calin Leafshade

Quote from: monkey_05_06 on Tue 16/03/2010 11:18:27
Tentacles, not to be rude,

I love this opening statement.. As if tentacles is a completely valid thing to call someone..

"Listen, Tentacles honey...."

Crimson Wizard

By the way, just a sudden thought. Does the room actually have a background? I have a feeling that without background nothing would show up, even GUIs.

Then again, where's that video you mentioned above?

monkey0506

Without a background I'm pretty sure the game wouldn't run at all which is why the default game template now has an empty room with a blank, black background which runs fine.

Tentacles



    Already its finally working. Apparently my computer, because its running vista, has the tendency tlo switch colors to vista basic.

SMF spam blocked by CleanTalk