Can I use this say at in a Dialog?

Started by Icey, Sun 01/05/2011 16:07:47

Previous topic - Next topic

Icey

Can I use this say at in a Dialog?

Dave.SayAt(8, 167, 320,"Dave: Hey what are these time rings again?

Calin Leafshade

In a dialog script everything with a space or tab before it is executed like a normal script command. so just put a space before it in the dialog script.

Icey

So if it is shown as blue then the talking text is shown as red then I did this right?

Icey

I get this long list of errors When I load the game about my a unknown character.



I have more like this.
Dave.SayAt(8, 167, 320," Dave: Hey what are these time balls again?

And can I lunch a video from with in a dialog?

Dialog 0(5): Unknown character: dave.sayat(8, 167, 320,"
Dialog 0(6): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(7): Unknown character: dave.sayat(8, 167, 320,"dave
Dialog 0(8): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(9): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(10): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(11): Unknown character: dave.sayat(8, 167, 320,"dave
Dialog 0(12): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(13): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(14): Unknown character: dave.sayat(8, 167, 320,"dave
Dialog 0(17): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(18): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(19): Unknown character: dave.sayat(8, 167, 320,"dave
Dialog 0(20): Unknown character: dave.sayat(8, 167, 320,"dave
Dialog 0(21): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(26): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(27): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(28): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(29): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(30): Unknown character: moogle.sayat(8, 167, 320,"mr.mog
Dialog 0(31): Unknown character: dave.sayat(8, 167, 320,"dave
Dialog 1(5): Unknown command: playvideo("homework",evideoskipnotallowed, 0). The command may require parameters which you have not supplied.
GlobalScript.asc(1918): Error (line 1918): end of input reached in middle of expression

barefoot

#4
Hi

After indenting (tab space) SayAt you use the c for character as usual: cdave..you have not.

This works

Code: ags

wizard2: Match
   object[1].SetView(15);
   object[1].Animate(0, 3, eRepeat, eNoBlock, eBackwards);
    cwizard.SayAt(160,80,170,"Correct. Ok. I'll let you pass. But watch your back very carefully Magrid!!");
  object[1].SetView(15);
    object[1].Visible = false;
   cwizard2.ChangeRoom(25,258,226);


Your Video line should be: eVideoSkipNotAllowed (Note caps);
You have also not put in Video format and make sure Video is in the complied folder.

so something like:

PlayVideo("homework.avi", eVideoSkipNotAllowed,0);   - player can't skip video

Have never tried playing videos within dialog yet but I'm sure you could.

barefoot



I May Not Be Perfect but I Have A Big Heart ..

Icey

#5
Thanks Barefoot. It worked. :)

Icey

Wait, Now I have this problem.

Dialog 0(29): Error (line 29): buffer exceeded: you probably have a missing closing bracket on a previous line


P.S. I stopped using the c for character names after I found out it wasn't necessary.

barefoot

#7
Hi

I use c with char name and it works.. no need to fix it  :=   it errors if you don't put c in at indented SayAt..

paste your code here...

barefoot
I May Not Be Perfect but I Have A Big Heart ..

Icey

#8
I get a error every all of them & my game is cloded right now so I will give you an example

Dave.sayat(8, 167, 320,"Dave: I like waffles.");

or is it.

cDave.sayat(8, 167, 320,"Dave: I like waffles.");

If I use the c it is not recognizing the character. unidentified symbol or something like that.

?

barefoot

#9
You have to write it SayAt and not sayat and it has to be indented and include the c and make sure chars name is actually Dave or dave. (Is the char named without the c in its properties?)

Indent: Add a Space before text :

Code: ags
 
@1
   cDave.SayAt(8, 167, 320,"Dave: I like waffles.");


Try it

barefoot


I May Not Be Perfect but I Have A Big Heart ..

Icey

I will try this latter today.

And yes in the properties for each character I always exclude c.

monkey0506

barefoot, the problem is not a missing 'c' prefix as it is no longer required/automatically included since AGS 3.0. You can use the 'c' prefix to identify characters, and it is the preferred naming convention, but it is not necessary.

If icey isn't using the 'c' prefix when assigning script names in the editor, then simply using it isn't going to correct the errors. Thanks for trying to help, but that's not the problem.

When the dialog threw the errors about "unknown character" that is because you were not indenting your lines icey. In a dialog script if you want to use normal script commands like Character.SayAt, the line must be proceeded by at least one whitespace character. The normal convention for AGS code is an indentation of 2, but you have to have the line indented by at least one space or it will throw errors like this and will not compile.

Calin told you this. barefoot showed you this. You claimed to have gotten it working.

As far as the issue of "buffer exceeded", the only time I have encountered that error is if I forget a closing brace }, or if I forget to close a string-literal with a quotation mark ".

The only reason you should really have braces in a dialog script is if you're using conditionals that apply to more than one line of the script, but you've given no indication that you're doing that. So, check to make sure that all of your strings are closed out properly with quotation marks at the end.

Oh, and of course that only applies to the normal scripting commands, not to the dialog script lines.

barefoot

Hi Monkey

Yes, as you say, the C is no longer required in char properties.  One of course assumes it is named and denoted as such. That's all I was trying to saying..

Thanks for the extra info Monkey..

Hope it gets sorted Studio3.

:=

barefoot




I May Not Be Perfect but I Have A Big Heart ..

Khris

#13
Icey, it is unfathomable to me how you ever get anything remotely done after seeing this (this includes rhythmic breathing). Calin told you in the very first reply what you need to do in order to put script commands into dialog scripts.

You didn't once figure it might be a good idea to paste part of your actual script here instead of countless error messages all saying the same, because this would have solved the issue immediately.
Granted, barefoot's upfuck wasn't helpful, but ultimately he managed to tell you what the actual problem was and when you got the buffer error, you still didn't post the code you used.

I simply can't understand what's happening behind your eyes sometimes. :(

Edit: if you don't put a space at the start of the line, AGS colors the char cyan and the text red; if you type the space, auto-complete kicks in as soon as you typed the first three letters of a command.

abstauber

@Monkey + Khris: I know, you guys are the No.1 trouble shooters here and I know that it is very frustrating that some people have a shallow learning curve.
But this slowly turns into a beginners bashing board :(

Okay, I'm no help either, but there has to be another way to cope with exasperation.

Khris

True. It's just that with this guy there's no curve at all, there's just stagnation.
Nothing we ever say, ever, does anything else than solve the problem immediately at hand, if even that. The methods or advice are never, ever, ever used at a later point in time, let alone for something remotely similar to transfer.

Time and again we have to painstakingly spell out what already is explained in the fucking manual.

It just gets to you. Honestly, I'm amazed at our patience, that we're still helping him at all. We could simply ignore his threads as a whole and other people I'm sure would have long before began doing just that. In any other forum this guy would've been perma-banned months ago.

See, he doesn't even address what we complain about. The only thing he will post is whether this worked or not. It's like the technical forums to him are some kind of advanced online help, not interaction with actual people.
It's social retardation at the highest level if you ask me. What are we supposed to do?

abstauber

QuoteIt's just that with this guy there's no curve at all, there's just stagnation
Nah... just compare the first "games" he made. There is a definite learning progress.

QuoteThe methods or advice are never, ever, ever used at a later point in time, let alone for something remotely similar to transfer.
Terribly true

It's just that this particular guy seems to ruin it for anyone else.

QuoteWhat are we supposed to do?
Thats the 1.000.000 $ question. Ban? Ignore? Being degraded as online help? Blow up every single icey thread? I'm afraid there isn't an easy answer.
When he first joined, I thought his membership would only last a few weeks. Especially when he joined the wintermute forums. But I guess this is last board on the interwebs, where he isn't been ignored and actually helped.

Still this isn't the worst icey thread yet ;)

monkey0506

I really don't want to turn this into an icey bashing thread..and I'm still, as I'm typing, debating even posting this, but abstauber why did you indicate me, in this particular case?

I can admit that there's been times when I've been a bit impatient, even unnecessarily or unwarrantedly. There's been times when I've posted replies that have not been helpful to those that they were intended to help, if not only in part due to the fact that I've not taken the time to explain myself.

But here..

The first third of my post was directed at barefoot, explaining that while his attempt to help out is certainly appreciated (teaching others is a great way to learn!), he was simply misguided in his understanding of what the actual problem was. I didn't, IMO, say anything to attack him for his attempt, simply explain that and why it wasn't actually as helpful as he was trying to be.

The remaining two thirds of my post were directed to icey, explaining why he was getting the error messages he was getting. Again, I don't think that I lashed out here in aggression or impatience. Pointing out that the answer had already been provided is certainly not aggressive if approached from a passive point-of-view.

So, this is certainly off-topic which is not what we need in this thread especially (for several, various reasons), but I honestly don't feel that the direction of your post here was really warranted in itself abstauber. Khris' post had a more aggressive tone, but as pointed out, icey has proven himself to utilize the help provided here much less efficiently than we typically expect. I'm not trying to make myself out to be some better man, I've done the same thing at times. But that's why I feel your post was, altogether, unnecessary, and has lead to an off-topic tangent.

I'm not a moderator or anything, but I would say that this type of comment would be better left to PM. :-\

abstauber

Okay, to keep it short:
I couldn't loose the feeling that more and more replies have quite a sarcastic undertone.
That can't be good. Either way it smell like frustration and I found it was time for a reminder that we all do this for fun.


Don't get me wrong, I very much appreciate all the time you invest on helping beginners and intermediates. I'd never have the patience.

Khris

Keeping it short is a good idea, I'll do the same.
It's really simple anyway:

People who ask stupid questions are answered in a normal, non-sarcastic way.
People who ask stupid questions all the time, for months on end, may find themselves reading a frustrated/sarcastic reply.

Any increase of sarcasm is exclusively due to an increase of threads by people of the second kind.

(Also, monkey is much more civilized in his replies.)
(And, most people here are good at figuring out how to figure shit out. This is a prerequisite of using a game engine with scripting. If you can't, stop using it or learn to deal with sarcasm.)

SMF spam blocked by CleanTalk