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

#1
I actually enabled that option and then disabled it because I figured it wasn't relevant to my issue  :grin:

Well, I feel silly now, I'm running v3.6.1. Is there any way to work around it, or should I go ahead and download 3.6.2?
#2
Quote from: Crimson Wizard on Sat 18/01/2025 20:47:02Please clarify your intent, do you want to abort a dialog when dialog options are displayed, or in virtually any point of a dialog script (like, in the midst of characters talking, etc)?

Ideally, when dialog options are displayed: I'd like to implement a way for the dialog to shut itself if the player takes too long to choose any option. As if the NPC got bored and wandered off (I suppose the next logical step would be to reset the timer any time the player returns to the option tree and takes too long to pick another dialog option, but that sounds even more complicated, I'd be okay with it just working once, before any option is chosen).
I crammed the whole thing (setting the timer, running it and resetting) into the room script where the character with the dialog is. The timer does work, as the SayBackground test pops up every few seconds. Couldn't understand the use of CurrentDialog and StopDialog via manual though, and the obviously incorrect "if" statement triggers an error.

Code: ags
function repeatedly_execute_always(){
 
// Error (line 10): '.CurrentDialog' is not a public member of 'Dialog'
 if(Dialog.CurrentDialog == dDialogoCuchara){
 if(IsTimerExpired(1)){
   //dummy dialogue
   cCuchara.SayBackground("Me aburro.");
   SetTimer(1, 120);
}
}
}
function room_Load()
{
  SetTimer(1, 120);
}
#3
Hi!
I'm attempting to have a dialog end on its own after a given amount of time has passed. However, starting the timer and checking if it's run out with AGS script inside the dialog won't work; as far as I understand, I need to put that in a repeatedly_execute_always function. I set the timer on the room_Load function, and put checking for/resetting on the repeatedly_execute_always function, with a dummy Say command from a character, but the timer only runs when the dialog isn't open.


I've been searching other threads for this issue, and messing with CurrentDialog and StopDialog(), but I couldn't really understand the context of the answers to similar questions. Also read someone suggesting using the Custom Dialog options, but checking the manual I feel that's too advanced for me at this point.

Thanks in advance.
SMF spam blocked by CleanTalk