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

#41
Things to keep in mind, yes, I indeed am fine! My function works nicely now!
#42
I'm want to store the channel number of a playing audio clip as a variable, and I did indeed work out how to read the channel, with this command.

Code: AGS
radiochannel = aradio1.Play();


But on compile, I get this message.

radiocontrol.asc(8): Error (line 8): Type mismatch: cannot convert 'AudioChannel*' to 'int'

I thought audio channel was supposed to be returned as an int. What gives?

(Yes this question is pretty dumb. Oh well.)

EDIT: Doh. It seems Audiochannel* is a valid type for a variable. I should think things through more often. I'll see if this fixed my problem and edit the thread one last time.

EDIT 2: And everything works as I wanted it! I shouldn't give up and look for a walkthrough so easily! ;)
#43
Hmm... looks like a fun time. Well, if this isn't all improved, I guess I'll look into scripting this all as sfx. Fun times. (Oh well. The speech subsystem is a bit long in the tooth.)
#44
Indeed, what a great philosophy to live by! Cheers!
#45
That can be done easily as part of my interface anyway. I could just hide the interface, and bring up images of the dialog options. Yes, I'm using images. That's... probably not good, isn't it?
#46
I meant the " two recent threads dealing with replacing built-in speech" that Khris above was talking about, or is that those? Incidentally, what's the difference between dialog and speech rendering?
#47
Upcoming AGS, eh? Should I hold my breath? And can I have a link to those threads? Sounds interesting. Anyway, right now the design needs are basically "nothing," as the game is in very early stages, I'm just trying to have a usable interface and a solvable first room/puzzle. Thanks!
#48
Quote from: Ghost on Sun 30/06/2013 04:01:34
You could break the overly long blahbla into a few separate blahs. That way you allow for line breaks, and will at least get rid of the odd cut-off blah. I must admit this is probably the longest blah I've ever seen in a game.

Or... is that a placeholder blah?

Yes, it's just a placeholder bunch of text to demonstrate AGS' behavior while my game is still in early stages of development! Shh!

Quote from: Khris on Sun 30/06/2013 10:59:06
There's always the option to replace the .Say function. You could use Overlay.CreateTextual for the desired effect. You'd have to code an extender function like Character.Speak(String message) and use that instead.
The only problem with that approach is that you can't use the dialog script shorthand any longer. You'd have to use cSomeguy.Speak("bla bla bla"); for every line.

The other thing is, may I ask why you want this? I mean there's a reason that la-style speech doesn't span the screen: it's easier to read that way.

An overlay? Interesting. I was wondering myself earlier if a GUI would work. Hmm...

Though it's not specifically Lucasarts-style, just that I'm using the style of speech, I guess. As said, changing the style doesn't seem to have any effect, so really, I just have it set as it is right now because I've no reason to care. For the record though, I'm not making a Lucasarts-style game, and this is narrator text. In my design, vertical screen real-estate is at a premium! (I'm using 320x240!) Maybe I'm just being an idiot design-wise though... ah, early states, you know? Well, needless to say, I'm trying to make a strange game! Cheers!
#49
None of the other options seem to help me. Thanks for the tip though. I suppose I'll just write around this limitation. Like a player, I must be clever!
#50
The dialog doesn't span the screen, for example, if I have a character say. blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah, it will look like this.



Is there any way to make it utilize the entire horizontal span of the screen, instead of being squished into the center bit of the screen?
#51
Ahh... thankyou. Just as I imagined. I'm an idiot and forgot the else statements. DOH! And yes, my code could stand to be better formatted. A LOT. I'm really bad with that. Sometimes the editor nicely indents the code for me, but sometimes it doesn't. Probably a PEBCAK there.  :D
#52
There's got to be something really stupid here that I'm doing, or maybe I'm just bad at looking at things. (Please don't be TOO hard on me!) But whatever it is, I've done something wrong, and now my code is doing something I don't want it to do.

Anyway, to be more specific, I am using the 9verbs template to power my game. In accordance with it, I have a section of code that looks like this:

Code: ags
function hDoor_AnyClick()
{
if(UsedAction(eGA_LookAt)) {
StartCutscene(eSkipESCOnly);
player.FaceLocation(152, 65);
Wait(60);
player.FaceDirection(eDir_Down);
player.Say("I don't know why, but I think it's a door.");
EndCutscene();
}
if(UsedAction(eGA_Open)) {
  Unhandled();
}
if(UsedAction(eGA_Use)) {
  Unhandled();
}
else {
Unhandled();
}
} 


Yeah, I don't comment my code. My mindset is "Who besides me will ever look at it?" (Waitaminute...)

Anyway, what we have here is (supposed) to be as follows: When you look at the door, the character looks at the door, turns to the player and remarks on it, sarcastically. When you attempt to open it, right now it's unhandled, but that's a placeholder for when I put proper code for opening the door. Same goes for use. The else clause is for any miscellaneous action that I wouldn't expect you to do to a door. (Pick up? Give? Unlimited possibilities!)

Problem is, after remarking on the door when looking at it, the else statement is executed anyway, causing the character to remark, out-of-context "Nice door". Now, I'll just say that this little unhandled-case string will probably be replaced with some sort of error message in the final game. Part of my design philosophy is to always have a dialog for looking at anything! But there's my current headscratcher. Why exactly is the else statement being executed, and how can I stop it? As I've said, I'm probably stupid, but who knows? 
#54
I'd love you if you'd do that! Anyway, I probably won't be around to ensure a timely release. It's getting late here and I'll probably go to bed soon. Thanks, though!
#55
Good, it's a bit of an embuggerence how Removeclip stops the track playing... (With the way I was gonna use it...)

Great program! Keep it up and this could be one of the most important AGS modules! (Unless equivalent function is ever provided within AGS itself. *grin*)
#56
Right. Already worked out my own solution, but yours is more elegant! I wasn't aware of a RemoveClip function! :/

Oh yeah... you should probably be aware that your little module calls some files that don't exist. This part of code generated a compile error.

Code: ags
if (clip == aFlyOnTheWings) return "Fly";
if (clip == aSimpleAndClean) return "Simple";
if (clip == aMrBrightside) return "Brightside";



Thankfully, commenting them out seems to have had no ill effects. Wanted to post it in the module's thread, but the forum warned me that it may not have been a great idea. (Unintentional bump?) Thought you should know, though...
#57
Thanks for everything! Unfortunately, not only did the revised code, as you said it would, play the first song repeatedly, but it also made it impossibly to play the game! The wait command disabled the interface! (It was meant to wait for the song to finish!)

Thanks for the module suggestion too. I'm going to try that instead, it may be what I want. Thanks for everything! Sorry to waste your time! (?)
#58
Hello! It's been a while since I was last here!

Anyway, in recent endeavours, I've been working on some other games. A game I'm currently working on has a few advanced things I'm using, and unfortunately, I seem to have broken it.

Anyway, I should describe the... err... function of my function. First, the game plays a song at the beginning. Then, when the song is done, it plays 1 of 5 songs, randomly. When this is done, it plays a different one. Here is my script code:

Code: ags
function musicplayer() {
while (aIntro.Play) {
  Wait(1);
}
int ran=Random(4);
if (ran=0) aCartown1.Play(eAudioPriorityNormal, eOnce);
if (ran=1) aCartown2.Play(eAudioPriorityNormal, eOnce);
if (ran=2) aCartown3.Play(eAudioPriorityNormal, eOnce);
if (ran=3) aCartown4.Play(eAudioPriorityNormal, eOnce);
if (ran=4) aCartown5.Play(eAudioPriorityNormal, eOnce);
while(aCartown1.Play) {
  Wait(1);
}
while(aCartown2.Play) {
  Wait(1);
}
while(aCartown3.Play) {
  Wait(1);
}
while(aCartown4.Play) {
  Wait(1);
}
while(aCartown5.Play) {
  Wait(1);
}
}


It's uhh... a bit messy! *grin*

Anyway, first error I get is on the first line. It's "GlobalScript.asc(385): Error (line 385): expected '('"

Now, I already have a (! What gives?
#59
AGS Games in Production / Re: Broken Quest V
Thu 04/08/2011 17:14:30
bump
#60
And thank you! I couldn't have done it without your help!
SMF spam blocked by CleanTalk