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

#1921
You can't create member functions that have the same name as a built-in global function.
Is this something that can be fixed?

Edit:

I get

Quote
Exception 0xC0000005 at EIP=0x005E6AB1, AGSE v2.70.549

if I do this:

Code: ags

// Main header script

#define AGS_MAXREGIONS 16 // including region 0!

struct ccsRegionType {
  short framesounds[128000]; // 3d array: AGS_MAXVIEWS*AGS_MAXLOOPSPERVIEW*AGS_MAXFRAMESPERLOOP
};


Code: ags

// main global script file

ccsRegionType ccsRegion[AGS_MAXREGIONS];



and try to save the game. Can anyone confirm this?
#1922
I don't think that's possible at the moment. The transition styles are used only when changing rooms.

Try this as workaround:

Code: ags

// Script for room: Player enters screen (before fadein)

  if (GetGlobalInt(77) == 1) { // if waiting enabled
    Wait(40);
    SetGlobalInt(77, 0); // disable waiting when re-entering this room
  }


Code: ags

  //...

  SetNextScreenTransition(TRANSITION_BOXOUT);
  SetGlobalInt(77, 1); // enable waiting when re-entering this room
  NewRoom(character[GetPlayerCharacter()].room); // re-enter current room

  //...


Edit:

If you need it on more than one occasion, put the first part in the on_event/ENTER_ROOM function and create your own custom function for the second part.

Like this:

Code: ags

// main global script file

function on_event(int event, int data) {

  if (event == ENTER_ROOM) {

    if (GetGlobalInt(77)) {
      Wait(GetGlobalInt(77));
      SetGlobalInt(77, 0);
    }

  }

}


Code: ags

// main global script file

function FadeEx(int style, int waitloops) {
  SetNextScreenTransition(style);
  SetGlobalInt(77, waitloops);
  NewRoom(character[GetPlayerCharacter()].room);
}


Code: ags

// Main script header file

import function FadeEx(int style, int waitloops);


Code: ags

  //...

  FadeEx(TRANSITION_BOXOUT, 40);

  //...


Please tell me if it works... ;)
#1924
By "busy" I reckon you mean the Wait mouse cursor?
Check out HideMouseCursor in the manual.
#1925
QuoteFunny that..I thought the
// animation would have started before the
// message?!?

That's correct. It has been started. Since it's a non-blocking command, the following script is executed immediately afterwards.
The reason you see the animation only after clicking away the Display message is that Display IS a blocking command, pausing the game while it runs.

The "while" was used to make the animation blocking with being able to skip it, since it was a looping animation. Making a looping animation blocking with AnimateObjectEx would make no sense since it loops forever, thus blocking the game forever.

But since we don't need a looping animation, we can make the animation run once, but make it blocking by itself so that the following code (changing the background) is executed after the animation has finished.

Change
  AnimateObject(7,0,40,0);
to
  AnimateObjectEx(7,0,40,0,0,1); // play animation once, blocking

Quote
SetBackgroundFrame(1); //This does not execute or
                                        // show the new background

If Display is executed, so is this command. There must be something else afoul.
Are you sure you've imported the correct, changed background image as the new background animation frame?
Is 1 the correct frame number? 0 is the original background, 1 the first animation frame, 2 the second animation frame and so on.

#1926
Actually sound effects are packed into the exe file.

Thanks for providing such a detailed analysis.
Does it only happen to wave format files?
#1927
Advanced Technical Forum / Re: Speech Silenced
Wed 29/12/2004 15:31:46
He means have you rebuilt your vox files (Menu "Game" -> "Rebuild VOX files").
And try

CHRIS: &1 A snake wearing a wicker hat. Strange...
#1928
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=17723

You could also make the stone an object, then

- Animate EGO throwing (AnimateCharacterEx blocking)
- Turn on stone (ObjectOn)
- Move stone toward snake (MoveObject blocking (example in manual))
- When move over/stone reached snake, turn off stone/move to ground and animate Snake getting hit (AnimateCharacterEx)

There are many possibilities.
I haven't actually done anything of the sort yet, so someone else has to tell you what the easiest/best solution is.
#1929
Read CJ's (Pumaman's) reply below.

I don't think you can use an older engine with a game created by a later version.

Contact CJ about whipping up an MP3-less version.

Edit:

Btw, if you've just started using AGS, there's no harm in using the current version of the editor. IIRC when your game is compiled, the version of the engine (acwin.exe) in the editor folder will be used to create the game exe file in the Compiled folder.
By the time you're finished with your game I'm sure AGS v2.7 will be ready. I hope CJ remembers to supply a non-MP3 version of that.
You may want to contact CJ anyway to show that there's a demand for that!
#1930
QuoteA short animation then follows of the character throwing the sword at the lifebuoy.

That could also be accomplished animating the character itself.

QuoteI want to show the final picture "after" the animation of the rope tied to the boat and the other end attached to the lifebuoy(that is, the sword in the middle of the lifebuoy),

As I said, draw another version of the background or use an object that's initally off, containing a picture of the rope tied to the boat and lifebuoy.
Set the background frame or turn the object on after the animation.

Quotewith the same objects displayed in the boat that have not yet been put in the inventory.

I'm not sure what you mean.
Objects don't appear or disappear by themselves. They stay on/off if you don't turn them on/off and they're not affected if you set another background frame.
You don't draw stuff you can pick up directly onto your background, do you?

QuoteI also wanted to loop the animation and allow the user to quit/escape the aimation at any time

I don't understand why this animation has to be looped at all. What is he doing?

Quoteand for the next scene not room to be displayed.

Next scene? Another room?
I'm sorry, I don't know what you're getting at.

QuoteThe only way I can think of stopping the animation is by using SetObjectView after the while loop.

Glad that worked.

Quotehowever I can't seem to display the final picture after the animation containing the objects that had not been pu tin inventory.

What does happen? Do you get an error message?

Quote// Want to display final picture after it stops here,

Do you mean the last frame of the animation?
If so, try running the animation once again after the while loop, this time non-repeatedly, or just use SetObjectFrame.

Quote// but seems as if code will not execute passed
// SetObjectView

I doubt that's a bug. To be certain, put a simple Display command there to see if it gets executed.

QuoteHope I got the German correct...

Yes, very good! :)

Quoteyes I know no chatting in the forum

Not in the technical forums, anyway. ;)
#1932
I'm afraid you've lost me here. "Retrieving current room"? Are you changing rooms after all? ???
Maybe you could post the whole script you have written for this interaction. I'm confused...
#1933
QuoteI executed the game and immediately from the start, the background kept animating/looping between the two background. I couldn't for the life of me find out what is causing this.

Like Ishmael said, if you import additonal background frames into your room, they are being animated by default.
So setting the room background to the first frame (the normal background) when you enter the room should disable this animation. See above post.

Quotethe animation sequence continues to loop when I press escape.

Hehe, yes it does since you don't tell it to stop.
What we're doing is starting a looping object animation, then stopping the script to wait for the ESC keypress. Otherwise the object would just keep animating non-blocking in the background.
After the keypress we have to tell it to stop this animation:

while (IsKeyPressed(27) == 0) Wait(1); // wait for ESC keypress
SetObjectView(7, 3); // does this stop object animation?

(We don't need IsObjectAnimating anymore as it will always be true since the animation loops.)

I don't remember what the proper way to stop an object animation is, you can try re-setting the object view as I have done above or simply re-starting the animation, but this time non-repeating so it only animates once then stops.
Try a few things and please let us know how it turned out.

QuoteAgain I am eternally greatful for your help.

Gern geschehen. :)
#1934
Maybe it's just my Linux chm viewer acting up but could it be that a lot of entries for the new functions don't link to their anchors on the respective pages in the help file?

Also, I'm in favor of object-ising walkable areas, regions and walkbehinds as well.
As it is now, their functions seem out-of-place compared to the rest of the scripting language.
I vote for at least grouping them via static member functions so you have the advantage of auto-completion.

And how about merging PlaySound and PlaySoundEx now that parameters can be optional?
Not specifying a channel would use PlaySound as usual, otherwise it would act like PlaySoundEx.
#1935
If y=15 and x=4 and height=30 then yes, it's
  Blah[(15 * 30) + 4]

With width=300, x=15, y=4 it's
  Blah[(15 * 300) + 4]
#1936
Yeah, and better use
  (2*30)+17
just to be sure. ;)
#1937
Have you tried playing around with the game setups? Audio output and the like?
Also, try closing programs in the background, virus scanners and the like, just to be sure.

Just trying to rule a few things out before CJ gets here. ;)
#1938
Haven't you installed SP2 recently? Was this before or after the problems started?
#1939
The code got mangled, I suppose you were doing
Code: ags

if (character[TOMSCRIPT].inv[0]) {
    ObjectOff(0);   
} 

?
If so, it doesn't work because there's no inventory item 0! :P

However, there's no need to change rooms!
Why don't you stay in the room and just turn on another object that shows the rope tied to the boat?
You could also draw another frame for the background and set it with SetBackgroundFrame.
#1940
Quote"Type mismatch: string with non-string."

That's because you're trying to copy a string ("str0") into a single letter (strarray[ 0 ]).

Remember we are using the char arrays as a replacement for strings! Leave them at 200 characters, that's the maximum length of strings in AGS at the moment.

Do the multi-dimensions on the parent, Blah in my example.

You probably want something like

Code: ags

// Main header script

struct mystrings {
  char str[200];
  //...
};


Code: ags

// main global script

mystrings Blah[150]; // 2D array, width 30, height 5: Blah[30][5]



Code: ags

//...

StrCopy(Blah[2*30+17].str, "sometext"); // y*width+x

//...
SMF spam blocked by CleanTalk