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 - Skele

#1
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!
#2
Hi,

So I'm making a dialog, and everything works, but not completly how I want it to, the only problem is,
that the dialog options get displayed all at once.
I want the character  to choose between two options, then talk a bit, and then get another two options to choose from.
But they all get displayed at once.

Also I found a way to show dialog only after a certain thing has happened trough variables, but i couldn't find out how to remove options.
(So you have two new ones, and the two old ones are gone, after something happened that made the variable counter go up)

Is it possible to do anything of that or should I do it in a different way?
#3
Quote 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.

Ohh, it's working completly now, that's so cool!
Thank you a lot!!
#4
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.

I deleted the rigth direction loop on accident, now it has left and rigth like the player character and it stopped crashing.
But it just goes back to the previous sitting view, instead of the walking view (the 8 view is the walking view, but it goes back to the 4 view where he sits, it's also the idle view, it jsut goes back to idling)
and it doesn't move anywhere.
#5
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.

Oh, I am an Idiot. I put the whole dialogu request function by itself in the global script now, instead of into a different function, and it's working.
Thank you!
It still crashes afterwards (after playing the gettting up animation, the character disappears and the game crashes, I think i did the walking away part wrong)
but the rest (the animation and the dialog) works now, and it stops until the dialog is done.
#6
EDIT:

My code looks like this now,
Code: ags
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) { 
    
  }


}

}


but I get the error "GlobalScript.asc(11): Error (line 11): Nested functions not supported (you may have forgotten a closing brace)"

I looked that up, and people said that the perobleme is always in the line before the one that's said in the error,
but the previous one is also closed with a brace, (it starts at line 10 in the room script, so line 5 is the " function dialog_request (int parameter) { " line)

it's the only error I get, I tried putting it at different parts of the global script and even in the room script after the room fade in.
#7
Quote from: Snarky on Fri 02/06/2017 08:15:37
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.
Ah it's almost working, I used
Code: ags

cAdrianSit.LockView(6);
cAdrianSit.Animate(0, 0, eOnce, eBlock, eForwards);
cAdrianSit.UnlockView();

cAdrianSit.ChangeView(8);
cAdrianSit.Walk( 3838,943, eNoBlock);


The game chrashes afterwards, so I'm trying to find out how to change the second part (the wakling part, i only managed to change the first part yet.

Thanks for telling me where in the manuall I need to look! (I wasn't really sure what exactly I was searching for.)
I'm trying to make it play after the dialogue trough dialoge_request now, do you think that's the rigth way to do it?
#8
Quote from: dayowlron on Fri 26/05/2017 15:34:11
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);

I tried what you said, but I only get the error
"GlobalScript.asc(58): Error (line 58): property 'Character::NormalView' is read-only"

#9
Hi, so I have a character who is sleeping when you enter the room.
I want him to wake up when the player talks to him, go back to sleep when the player stops talking to him and get up and walk outof the room when the player picks a certain dialogue choice
and then be erased from the room completly, so the player won't see him there again if they choose to go back to that room some time later.

I have the animations, and I managed to get the sleeping idle to work already, but i'm not sure how to handle the waking up and especially how to handle the walking out part.
I want to use a different character for the rest of the game, who will only have the standing and walking animations, so this one is only for this room.

The probleme I have with the waking up is, that I don't know how to make the animation finish completly and then go over to the awake idle before starting the dialogue.
And the probleme I have with the getting up and walking away is honestly the whole thing. I found a tutorial on how to make a character walk somewhere, but not how to make
him do something else before, like getting up.
#10
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.

Oh yes that was exactly what I wanted to do,
thank you a lot!
#11
Hello,

I added a few hotspots in my game, which are mostly just in the background (overt the sky and some roads etc.)
so it's not possible for the player to know that they can look there because it's just part of the background.

Is there any way to highlight the hotspot, or maybe make the coursor change colour
when it's over a hotspot or any other way to make the player know that they can look at that part of the background?

greetings
#12
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.

Ah, i haven't made any more functions in the other rooms to keep it playing,
I'm going to try to change the transition to instant!
Thanky you too!
#13
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

Oh, thank you!
I will try whats written in the tread you send me.
#14
Hello everybody,

I'm new to Adventure Game Studio, and I'm making a little something for college, and I have one piece of music (named aMusic1) and mp3 file,
which I already imported into the Music folder.
Now my question is, how can I make the music play in every room, and in the transitions between without starting anew?
I found
Code: ags
function room_AfterFadeIn()
{

aMusic1.Play();

}

and added that to the room script, but everytime the player changes rooms the music gets a skip in it and then continues
playing normaly.

The last sound that played before the player changes room, kind of repeats and then continues normally.
(Example: if the music goes La Li Lo Lum, and the player changes rooms while the Lo is playing, the Lo repeats in a skip and then conitnues with Lum etc.)
Is there any way to make the music to continue playing normaly even while changing rooms?

The other room has nothing in its script yet btw.

Also hello to everybody, this site seems very nice :)
SMF spam blocked by CleanTalk