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

#1
Quote from: cat on Sat 09/01/2016 19:10:28
The problem is, that dDialog1.Start() is not blocking AFAIK. So you start the dialog and immediately after that, check for option chosen (which at that point in time, was not yet chosen).

There is a much better solution to this: Just make the object visible from WITHIN the dialog script. In the dialog script itself, where you handle the desired option (5 in this case), indent the line and write the AGS code. Take a look at the manual in the section "Dialogs" and "Using scripting commands in dialogs".

i did it!!! you were right!! thanks!!!!111 :DD
and thank you Slasher for trying to help too!!
#2
Quote from: Grok on Sat 09/01/2016 12:11:02
You could check if the dialog option has been chosen in the room script.

In function room_RepExec() you could put in

Code: ags

if (dDialog1.HasOptionBeenChosen(5)) 
  H74.Visible=true; 


If the object is not visible, this will turn the object visible, after the dialog has stopped.

i did that, but nothing happens... as in, the object doesn't appear at all..
#3
oh, i identified the problem more throughouly:

the thing is that the object DOES appear, but only if you pressed the option... and chose to dialogue again.
as in, it doesnt appear immediately after the option has been chosen, but after the option has been chosen AND the dialogue started again.

ill try to be more understandable...

>object not visible

  >dialoge start

   >option 5 chosen

  >dialoge end

>dialoge start

>object visible


how do i fix this.
#4
Quote from: slasher on Sat 09/01/2016 10:21:31
Quotebut i really dont know what to do since the object's name (H74) isnt identified in the global script itself...
Objects in the Global (and dDialogs) use the objects ID and not the name:

Code: ags

//Example
object[3].Visible=true;


Code: ags

function PC_Talk()
{
  dDialog1.Start ();
  if (dDialog1.HasOptionBeenChosen(5)) 
  object[0].Visible=true;
   
}

i did it, but when i enter the game, the object is still visible before the option has been chosen

also, in the object's property grid, if i turn the visibility to false the object does not appear after the option has been chosen

(on top of that, the dialog closes after option 5, even though option 6 is the closing option, so i would expect it would act as needed if it decides to close the dialoge...)
#5
i want to make an object appear only after the player has chosen a specific dialoge option.
i've been thinking to use something like this...

Code: ags

function PC_Talk()
{
  dDialog1.Start ();
  if (dDialog1.HasOptionBeenChosen(5))
  //continue script here
  
}


but i really dont know what to do since the object's name (H74) isnt identified in the global script itself...
#6
well nevermind i gave up and remade the game (i needed to redraw the graphics and characters anyway)
haha whoops welp thread solved ">_>
#7
i dont know why it does it, it always finds a problem in that script no matter what.
it started when i tried to make a character. then it said, that the command doesnt have closing braces (it did.)
so i erased all the character interactions, and the character itself, and now it finds problems within the script (that i didnt write).

GlobalScript.asc(32): Error (line 32): Parse error: unexpected 'System'

GlobalScript.asc(-10): Runtime error: Function still open, missing }

i tried to temper with the second error a little, and i counted the braces and all, and it still shows that. as for the first error im afraid to do anything with it.
SMF spam blocked by CleanTalk