Dialogs / questions

Started by , Fri 13/05/2005 21:08:13

Previous topic - Next topic

Sektor_Z

Hi, i guess I'm still a noob with AGS, i have two simple questions about dialogs:
1. Why cant i use sctipting commands in dialogs
2. Is there a way to do it / how?

Im just trying to use a variable in dialog, if you use the correct stuff, you should get your variable higher.
[i've red the manual many times, anyway]
thanks
::)

geomis

If you mean commmands like  give inventory items i am sure i saw that some where in the help index or some where in help but if thats not what you were meaning then i dont know what your on about coz i a noob too.
IF I CAN'T WHY SHOULD YOU?!
WHAT JUST CAUSE YOU WORK AT THE BANK MEANS YOU CAN TAKE MONEY OUT?!It does?.....WHY DON'T PEOPLE TELL ME THESE THINGS!

Sektor_Z

Yeah, but i only need my variable to work now.

BorisZ

It's all in the manual. Check it again!

Sektor_Z

Well, im doing this all day. Could you point me at least?

Ubel

Dialog request is the thing you need.

Write this in the Dialog script: run-script 1

Then this to global script:

function dialog_request (int parameter) {
if (parameter==1) {
//your code here
}
}

I'm not sure if this is absolutely correct (didn't check from the manual).

Sektor_Z

Thanks, almost got it to work.  :)

function dialog_request (int parameter) {
if (parameter==1) {
// trust is the name of the variable:
trust += 1;
}
}

Now it shows "Undefined token 'trust'", but i've added this variable to the 'global variables' thingy , what did i did wrong...?

Ishmael

Read the scripting tutorial in the manual, it'll give you a nice start.

Anyway, to get the variable working, you need to define it... put:

int trust;

into the beginning of the global script...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Sektor_Z

#8
Heeey tuntis how's your ags life ;] i figured it out, thanks all (maybe?)

TerranRich

BFAQ'ed: http://balder.prohosting.com/bfaq/#coding02

I'll let it slide for now since the original site for the BFAQ is currently down. I will update all links with this temporary URL. :)
Status: Trying to come up with some ideas...

Sektor_Z

Thats a nice citey, but i figured it all, and i know EVERYTHING ELSE!
[ya right]
thanks again to all

SMF spam blocked by CleanTalk