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

#2681
Use Takara's script.
#2682
GUIs that are set to "Popup Modal" will pause the game when activated.
You will need to set your GUI to "Normal" and turn it off in the game_start function.
#2683
Hi and welcome to the forums!

QuoteI'm not a english speaker... I would say what I'mnt a good writer in your language.

Don't worry. Many of us here are not native english speakers, myself included. :)

Quotethe engine find a problem with the "1".

Your dialog_request function should look like this:

function dialog_request (int parameter) {
 if (parameter==1) { // run-script 1
   // do stuff
 }
 else if (parameter==2) { // run-script 2
   // do stuff
 }
 // more else ifs if required...
}
#2684
Must - not - download -- yet...  ;)
#2685
QuoteOkay, but how do I set an object to a view?

Never done it myself (yet ;) ), but I suppose this is it:

SetObjectView
SetObjectView (int object, int view)

Sets object number OBJECT's view to VIEW. The graphic is set to the first frame of loop 0 of the view.
Example:

SetObjectView(3,14);

will change object’s 3 view to view number 14.
#2686
Well, put it where it's missing! :P

Seriously, just post the script code here, we'll have a look.  :)
#2687
It's in the help file:

AnimateObject (int object, int loop, int delay, int repeat)

Starts the object number OBJECT animating, using loop number LOOP of its current view. The overall speed of the animation is set with DELAY, where 0 is the fastest, and increasing numbers mean slower. The delay for each frame is worked out as DELAY + FRAME SPD, so the individual frame speeds are relative to this overall speed.
The REPEAT parameter sets whether the animation will continuously repeat the cycling through the frames. If REPEAT is zero, the animation will start from the first frame of LOOP, and go through each frame in turn until the last frame, where it will stop. If REPEAT is 1, when the last frame is reached, it will go back to the first frame and start over again with the animation. If REPEAT is 2, it will do the animation once, but then return the graphic to the first frame and stop (whereas repeat=0 will leave the graphic on the last frame).

Example:

AnimateObject(0,2,0,0);

will animate object 0 using loop 2 of its current view once.
#2688
According to my quick research a moment ago, DSOUND.DLL is a component of DirectX. Try reinstalling that?
#2689
You could avoid the whole variables thing by activating the dialog options the moment your player does what has to be done to unlock them, in the same script.
Wasn't obvious to me at first, but I really can't see a reason to wait until you're about to run the dialog.

But I'm not too far ahead in my own game, so what do I know? :P
#2690
Quote@S // dialog startup entry point
1: "Hey, fish brotha! Wat's happenin?"
2: "Hello, enthusiastic fish brother."
return

Use character names instead of numbers:

@S // dialog startup entry point
ego: "Hey, fish brotha! Wat's happenin?"
clown: "Hello, enthusiastic fish brother."
return
#2691
Quote// room script file
AnimateCharacter(CGUY, 0, 3, 1);

You see, the room script file contains the room's variable declarations, functions (which contain your commands (=AnimateCharacter)) and so forth.

So an "unexpected 'AnimateCharacter'" is exactly that: When trying to run your game, the compiler expected to find a function or variable declaration there instead of the command you put there.

To create a function to put your command in, for example put an object in the room, then click its "Interaction..." button.
There, you select an action (What has to be done to execute your command?).
For example, select "Interact object", then select "Run script".
Now a function has been created in the room script.
IN THERE, you put your command.

Now whenever the player clicked on the object with the interaction mouse cursor, your command would be run.

Hope this helps.
#2692
No, same thing.
Anyway, if it works at your comp, it probably will on all others too.
So I'll go with the code.

Thank you!
#2693
It's the same behaviour with other sound files.
But here it is.
#2694
Advanced Technical Forum / Re:Gui Problem.
Sun 08/02/2004 17:38:44
Hehe, you're welcome. :)
I always seperate each segment of my script with at least one line. Makes the script longer, but better to read and therefore avoids problems such as this.
#2695
Advanced Technical Forum / Re:Gui Problem.
Sun 08/02/2004 17:31:22
Try this

...
if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
// scroll down
game.top_inv_item = game.top_inv_item + game.items_per_line;
}
if ((button == 5) && (game.top_inv_item > 0)){
// scroll up
game.top_inv_item = game.top_inv_item - game.items_per_line;
}
}

if (interface == SETTINGS) {
if (button == 0) {
SaveGameDialog ();
}
if (button == 1) {
RestoreGameDialog ();
}
...

and remove one brace from the end.
#2696
Advanced Technical Forum / Re:Gui Problem.
Sun 08/02/2004 17:26:23
Ok, braces check: :)

if (interface == SETTINGS) {
if (button == 0) {
SaveGameDialog ();
}
if (button == 1) {
RestoreGameDialog ();
}
if (button == 2) {
QuitGame (1);
}
if (button == 3) {
Display (" IDENTITY Demo Version 1.1{<{Copyright 2004 Zor Productions[ Written by Zor.");
}
if (button == 4) {
Display("Adventure Game Studio v2 run-time engine{<{Copyright (c) 1999-2003 Chris Jones");
}
if (button == 8 ) {
GUIOff (INVENTORY);
}
if (button == 6) SetGameSpeed(GetSliderValue(SETTINGS, 6));

if (button == 7) SetMusicMasterVolume(GetSliderValue(SETTINGS, 7));
}
} <- interface_click?
} <- ???

Maybe it has something to do with the braces in

Display("Adventure Game Studio v2 run-time engine{<{Copyright (c) 1999-2003 Chris Jones");

? What does {<{ do?
#2697
QuoteIf you try using another file type (eg. mp3/ogg), does it still happen?

Yes.

QuoteAnd conversely, if you use uncompressed wave for music, does the problem occur if you try to change the music volume?

According to the manual "Changes the currently playing background music to MUSICx.OGG, MUSICx.MP3, MUSICx.MID, MUSICx.MOD or MUSICx.XM", so using a wave file plays no music at all.

But using SetChannelVolume on the music channel (MP3) produces no artifacts, no.

QuoteThe reason I ask is that SetChannelVolume doesn't care whether it's being used on ambient sounds, music or whatever, it always does the same thing.

Not here.  :(

Btw, I tried it with increments of 1 instead of 3 too, same thing.
#2698
CJ: "The dialog options are drawn in the player character's talking colour. The highlighted option colour uses the GUI foreground colour if you are using a GUI TextWindow, otherwise it is hardcoded to yellow."
Thread

CJ: "(...) objects are placed with 320x240-res co-ordinates, so at 640x480 you can only place them on even pixels."
Thread
Take this into consideration when designing your backgrounds.
#2699
Hi!

I use this code

   int volume=0;
   PlayAmbientSound(1,12,255,0,0);
   SetChannelVolume (1,volume);
   while (volume<255) {
   volume=volume+3;
   SetChannelVolume (1,volume);
   Wait(1);
   }

in "Player enters screen (after fadein)" to fade in the ambience channel (rain starts falling).
It works basically, but there are artifacts introduced while doing this (listen to it here).

I had the same problem when trying to use a slider to set the ambience channel volume in my settings gui (with another ambience sound).
The sounds are uncompressed wave files, I use AGS 2.6 SP1, Win2k & SBLive! 1024 Player.

Strangely, this affects the ambience sounds only.
Does anyone else have this problem?
#2700
Sorry to bump up this thread, but the workaround indeed works, TK.

Since CJ suggests to write the startup dialog seperately anyway (to avoid it starting up again when using goto-previous), starting the dialog like this

DisplaySpeech(EGO, "Hi there!");
DisplaySpeech(LOU, "What do you want?");
Wait(1);
RunDialog(1);

solves the problem.
SMF spam blocked by CleanTalk