Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - strazer

#2221
Beginners' Technical Questions / Re: loops!?
Sat 26/06/2004 16:57:14
I vaguely remember some weird behaviour when a loop was missing, but I think this has been fixed since.
Which version of AGS are you using?
#2222
Wow, it's excellent!

Only the fingers still look wrong, but they're hard to do at such a low resolution.

Here's my suggestion:

- Shortened right arm
- Redrew hands
#2223
I like it very much!

My suggestions:
- Increase contrast on the face so you can make out his facial features
- Lengthen far leg and arm, they seem slightly too short, even for this perspective
- More pronounced shoulders, the sleeves seem to protrude diagonally from the neck

I like Tiki's paintover, too.

Good job!
#2224
You can use the
  PlayMusicQueued (int music_number)
function:

Put your music files in the game folder (not compiled) and name them
music1.mid
music2.mid
music3.mid
and so on (if you use digital music, name them music1.mp3 etc. accordingly).

Then, go to the room you want these files to be played in.
Click the "i" (interaction) button.
Double-click on "Player enters screen (before fadein)".
Choose "Run script".
Click the "Edit script" button.
Write the following:

PlayMusic(1); // plays music1
PlayMusicQueued(2); // plays music2 when music1 has finished
PlayMusicQueued(3); // plays music3 when music2 has finished
//and so on

If you want the music to be played at game start, put these line in the "game_start" function of the global script.

Edit2:

Better yet, put this in the global repeatedly_execute function (Menu "Script" -> "repeatedly_execute"):

if (IsChannelPlaying(0) == 0) { // no music playing currently
  PlayMusic(1); // play music1
  PlayMusicQueued(2); // play music2 when music1 has finished
  PlayMusicQueued(3); // play music3 when music2 has finished
  //and so on
}

This way, the music doesn't stop when the last track finished playing.
#2225


After running to the train to the world cup 2006 semi-final here in Germany.
#2226
A list of scripts? I don't know what you mean.

All script commands are explained in the manual.
And SSH released an AGS quick reference sheet a while back.

If you're looking for sample scripts, read the "READ THIS THREAD FIRST BEFORE ANYTHING ELSE" thread at the top of this forum for resources.
#2227
Advanced Technical Forum / Re: Dialog script
Sat 26/06/2004 10:01:46
Just as normal script commands can't be used in dialog scripts, "option-on" is a dialog script command and can't be used in normal scripts.
Use the SetDialogOption function.
#2228
QuoteIs there a way to push down the dialog options from the top of the GUI a little?

Use the game.dialog_options_x and game.dialog_options_y variables.

QuoteHow do I display graphics in this GUI?

I think the dialog options background is black, no matter what graphic you set for the GUI.
Just choose a background image for your custom dialog options GUI.
Depending on what you want to do, you could experiment with dialog bullets. They are displayed next to each dialog option. Go to Dialogs and press the "No dialog bullet point" button.

QuoteAlso, is there anyway I can change the font just in the GUI?

As far as I know, no, dialog options use the normal font.

QuoteOhh... and is there any way I can make it stretch up from the bottom of the screen only the amount of room it needs for the current amount of selections?

Check "Dialog options go upwards on GUI" in General Settings.
Not with a custom GUI I think.
#2229
Glad I could help. :)
#2230
Ok, here goes again: :)

"Run script" actions are always executed last in a list of actions in the Interaction Editor.
Since you've done the animation via a "Quick animation" action, it is executed before the "Run script" action. Thus, you have to do the animation with script by adding the following lines to the script of your "Run script" action:

  SetCharacterView(CHARACTERHERE, VIEWNUMBERHERE);
  AnimateCharacter(CHARACTERHERE, LOOPHERE, DELAYHERE, REPEATHERE);
  while (character[CHARACTERHERE].animating) Wait(1);
  ReleaseCharacterView(CHARACTERHERE);

You have to replace the parameters (the ones in CAPITALS) with the values you've used in your "Quick animation" action. This could look like this example:

  SetCharacterView(EGO, 7);
  AnimateCharacter(EGO, 1, 0, 0);
  while (character[EGO].animating) Wait(1);
  ReleaseCharacterView(EGO);

After you're done, you can remove the "Quick animation" action.

Btw, I've noticed in the image you've posted in the other thread that you're using "Run dialog" actions for letting the player character talk when you look at something, for example.
That's not what dialogs are supposed to be used for. You'll eventually run out of topics too (the maximum is 500 at the moment).
I suppose you don't want to use "Game - Display a message", so I suggest doing the following instead of the "Run dialog" actions:
- Select a "Run script" action.
- Press the "Edit script" button
- Write
  DisplaySpeech(GetPlayerCharacter(), "The player character is saying this text!");

Edit:
Added while... line so game waits for animation to finish before continuing
#2231
What people mean is that if you want to add a post that directly follows another post by yourself, you better edit that previous post and add what you want to add.

As for your problem, select the "Run script" action and press the "Edit script" button.
At the end of the script, put the following lines:

  SetCharacterView(CHARACTERHERE, VIEWNUMBERHERE);
  AnimateCharacter(CHARACTERHERE, LOOPHERE, DELAYHERE, REPEATHERE);
  ReleaseCharacterView(CHARACTERHERE);

and replace the *HERE parameters with the values you used in the "Quick animation" action. (Check the manual!)
After you're done, you can remove the "Quick animation" action.

Edit:
Forgot a parameter for SetCharacterView
#2232
QuoteBut the aneimations runs before everything else.

This is by design.
"Run script" (and "Run dialog" as well?) actions are always executed last.
You could put the scripting equivalent (SetCharacterView, AnimateCharacter, ReleaseCharacterView) at the end of the "Run script" action.

Btw, I'm no moderator, but please don't edit the thread if you have additional unrelated questions.
How are people supposed to find this thread if they experience similar problems? Better start a new thread or add another post to the bottom.
#2233
Actually it is "laid". :)

Edit:
Or "I lay awake" even?

http://englishplus.com/grammar/00000233.htm

I'm confused...
#2234
Esseb, have you tried to check "Show results as messages"?
I agree that should be checked by default.
#2235
Do you mean the global message isn't displayed when you use this custom function?

If not, how do you display the message?
With the interaction editor? If so, what conditions/actions did you choose?
If you use script, what is the script code you use?

You must remember to provide more information, we're not psychic you know. :)
#2236
The error message is correct, I missed the ";" , sorry.

Change

DisplayAt(x, y, GetTextWidth(message, 0), message) // display message text at specified coordinates

to

DisplayAt(x, y, GetTextWidth(message, 0), message); // display message text at specified coordinates
#2237

Menu "Script" -> "Edit global script..."

// main global script file

function DisplayMessageAt (int message_number, int x, int y) { // create custom function
  string message; // declare variable that holds the message text
  GetMessageText(message_number, message); // put message text in variable
  DisplayAt(x, y, GetTextWidth(message, 0), message) // display message text at specified coordinates
}


#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
...


"Script" -> "Edit script header..."


// Main header script - this will be included into every script in
// the game (local and global). Do not place functions here; rather,
// place import definitions and #define names here to be used by all
// scripts.

import function DisplayMessageAt (int message_number, int x, int y); // import function so it can be used in all rooms
#2238
No.
But it's not that difficult:

Global script

function DisplayMessageAt (int message_number, int x, int y) { // create custom function
  string message; // declare variable that holds the message text
  GetMessageText(message_number, message); // put message text in variable
  DisplayAt(x, y, GetTextWidth(message, 0), message) // display message text at specified coordinates
}

Script header

import function DisplayMessageAt (int message_number, int x, int y); // import function so it can be used in all rooms

Now whenever you need to display a message at certain coordinates, you choose the "Run script" action and write
  DisplayMessageAt(7, 100, 200); // display message 7 at x=100 and y=200
#2240
Quoteyou can declare a variable with the same name in each room thus it will give you different variables

The same happens when you declare a variable in the script header.
SMF spam blocked by CleanTalk