Hi All,
I am very new to AGS, and I am finding it to be very intuitive and flexible!
The challenge I am trying to overcome is this: I need the character to take an action immediately after selecting dialog option 1 (code below). The way it is working now, the action will not happen until I click on the character again. I suspect this is because of my usage of HasOptionBeenChosen, but after looking at all the dialog options in the manual, I didn't see another way to do this. Please let me know if I need to add more context or if I am missing something. Thank you!
Code: ags
I am very new to AGS, and I am finding it to be very intuitive and flexible!
The challenge I am trying to overcome is this: I need the character to take an action immediately after selecting dialog option 1 (code below). The way it is working now, the action will not happen until I click on the character again. I suspect this is because of my usage of HasOptionBeenChosen, but after looking at all the dialog options in the manual, I didn't see another way to do this. Please let me know if I need to add more context or if I am missing something. Thank you!
function cOldBen_Interact()
{
if (bendialog == 10)
{
}
//start the dialog
dDialog1.Start();
bendialog = 1;
Display("The variable is %d",bendialog);
dKillorSpare1.Start();
//When option 1 is chosen, set variables, walk to select xy, play animations
if (dKillorSpare1.HasOptionBeenChosen(1))
{
StopDialog();
bendialog = 2;
benkill = 1;
Display("Kill is %d",benkill);
cGunslinger.Walk(705, 534, eBlock, eWalkableAreas);
cGunslinger.Animate(7, 10, eOnce);
cOldBen.Animate(8, 8, eOnce);
Display("The variable is %d",bendialog);
}