Oh, I didn't knew it was alrigth to use seperated dialogs like that, I thougth you had to have only one for each conversation.
Thank you!
Thank you!
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 MenuQuote from: Snarky on Fri 02/06/2017 12:31:36
The first thing you have to realize is that the "idle view" is not the "standing/sitting still doing nothing" view. It's for small animations that run so that the character is NOT just standing still, if they haven't been doing anything else for a while. For example yawning, tapping their feet, looking at their watch, picking their nose...
The "not doing anything at all" view is the NormalView (which you read with Character.View and set with Character.ChangeView()): the first frame of each loop is the "just standing" frame, while the other frames are the walking frames for that direction.
Therefore, when you set an IdleView, you also have to set a delay, which is how long to wait between each time you run the idle animation. If you set it to 0 (like in your code), the idle animation will run constantly on a loop. Apparently this also blocks the character from doing anything else.
Knowing that, the fix should be obvious.
Quote from: Snarky on Fri 02/06/2017 10:36:36
The code for the walk looks OK. Is the view 8 you're changing him to valid, and does it have loops for all the directions? For example, if the character is facing north and the view you're setting doesn't have an up walkcycle, it will crash when you try to change to that view.
Quote from: Snarky on Fri 02/06/2017 10:25:36
When it says "nested functions not supported", it means that it is illegal in AGS to put a function declaration inside another function. Here you have three functions inside each other! (Edit: Oh, you changed it before I posted, so it's a little different, but it's still the same mistake.)
function dialog_request(int blorg) is inside function dialog_request (int parameter), which in turn is inside function room_AfterFadeIn(). You can't do that.
On top of that function dialog_request (int parameter) and function dialog_request(int blorg) is defining the same thing twice: a function called dialog_request that takes an int parameter (it doesn't really matter whether that parameter is called blorg or parameter). You can only have one function with the same name in the same script.
The question here is when you want this animation to happen:
-If you want it to happen when the player enters the room, put it in the function room_AfterFadeIn()
-If you want it to happen when a dialog script calls it, put it in the function dialog_request()
In either case, you need to have a function declaration with just the code inside it, not another function declaration.
function game_start()
{
cAdrianSit.SetIdleView(4, 0);
function dialog_request (int parameter) {
if (parameter == 1) {
cAdrianSit.LockView(6);
cAdrianSit.Animate(0, 0, eOnce, eBlock, eForwards);
cAdrianSit.UnlockView();
cAdrianSit.ChangeView(8);
cAdrianSit.Walk( 3838,943, eBlock);
}
else if (parameter == 2) {
}
}
}
Quote from: Snarky on Fri 02/06/2017 08:15:37Ah it's almost working, I used
This is where reading the manual comes in handy. Open it in AGS from the help menu, go to "Scripting|Character functions and properties|View property (character)", and read the entry.
cAdrianSit.LockView(6);
cAdrianSit.Animate(0, 0, eOnce, eBlock, eForwards);
cAdrianSit.UnlockView();
cAdrianSit.ChangeView(8);
cAdrianSit.Walk( 3838,943, eNoBlock);
Quote from: dayowlron on Fri 26/05/2017 15:34:11I tried what you said, but I only get the error
I am assuming you are not wanting to use blocking animations. otherwise it would just be passing the parameter eBlock into the animation call.
Only other way to do it would be to set up a loop similar to below(see middle line) that will wait until 1 animation is over before starting another animation:Code: ags cJoe.View = vWakeUp; cJoe.Animate(1, 1, 0, eNoBlock, eForewards); while (cJoe.Animating) wait(1); cJoe.View = vWalking; cJoe.Walk( 0,100, eNoBlock);
Quote from: Cassiebsg on Sat 13/05/2017 12:31:01
If all you wish is just for the cursor mouse to change color/sprite/animate, then create the appropriate sprite how you which it to look when it is over a hotspot/object/character that youu can interact with. Then create a view with it.
Now, open your mouse cursor mode and change AnimateOnlyOnHotspot to True, and place the view number where it says View. You'll need to do this for all cursor modes that you wish to animate.
Quote from: Snarky on Fri 12/05/2017 08:27:46
Just to be clear: once you've started playing the music, you don't need to make any more function calls to keep it playing as you change rooms. As long as you don't play anything else, it should just continue. What you should definitely not do is to put a call to start the music in the room_Afterfadein() of each room, since that will restart it from the beginning every time.
As Khris says, the music glitching when you change rooms is an old AGS bug (what happens is that the engine is so busy loading the next room that it doesn't have time to load the next snippet of music into memory, so it just plays the current snippet over and over).
The first thing to check is that the graphics driver is set to Direct3D in winsetup, as this usually fixes it (and since Crimson Wizard has recently fixed the problems that D3D used to have). Or perhaps even the OpenGL driver from the very latest test build.
If that's not enough, try setting room transitions to instant. (If you absolutely want the fade to black, there are other ways to do it.) And then, as pointed out in the other thread, try changing the audio format of the music.
If none of these things work, there's an experimental AGS build where the audio runs in a separate thread, so it doesn't have to wait while you're loading a room. The drawback is that the audio can get out of sync with the game, but if you're not trying to sync music or speech exactly with animation, that doesn't really matter.
Quote from: Khris on Thu 11/05/2017 21:48:02
Hi Skele,
this is unfortunately a known issue.
Here's the most current info/workaround I could find: click
function room_AfterFadeIn()
{
aMusic1.Play();
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.088 seconds with 16 queries.