[SOLVED] Dialog Help: Triggering An Event/Global Variable

Started by JonCausith, Fri 08/08/2014 05:30:33

Previous topic - Next topic

JonCausith

EDIT: Finally got it working. Special thanks to Khris and a PM by Adeel S. Ahmed for helping me with this! ;-D


Hello!

I'm progressing through my adventure game, and almost have the first room fleshed out. The only thing that is standing in my way is trying to trigger a global variable in the code.

In dRadio Dialog Script (altered for the sake of spoilers):
Code: ags

@2
EGO: "Can you pull up a profile on the victim?"
DISP: "Right. Searching now..."
DISP: ...
DISP: "Here we go. He was arrested many times for swindling bystanders."
DISP: "He apparently belonged to a ring of grifters. He definitely was no saint."
EGO: "Interesting."
EGO: "So I'm investigating the murder of a petty criminal."
DISP: "Keep in mind, this man was guilty of pulling scams."
DISP: "Murder is a far more serious crime."
EGO: "I am well aware of that."
DISP: "Well now we know the victim, let's get back to investigation."
EGO: "Right."
option-off-forever 2
return


Ideally, I have this Global Variable called "vVicConart" which would trigger an event if it's value became 1 instead of 0. What should I do to tackle this problem?

If there's an alternate way of achieving what I would like to go for, I'm all ears.

Khris

You can use standard script commands in dialog scripts; all you do is indent them by at least one space. So you can either set the variable or call the function directly. Or use multiple commands.

JonCausith

Thanks, Khris! I tried coding in the dialog at first, but it didn't really work.

Now that I know that there's a trick to it, everything's working the way I want it to now.

SMF spam blocked by CleanTalk