I am trying a different method without using TEXT's, for now. This is the code I have so far:

Code:
...

function witch_event() // ORIGINAL - WORKS - DO NOT TOUCH OR ALTER
{
	if ((event_type == EVENT_CLICK) && (my.STATE == 2))
	{
		PANEL* my_panel_0 = pan_create(NULL,0);
		PANEL* my_panel_1 = pan_create(NULL,0);
		PANEL* my_panel_2 = pan_create(NULL,0);
		PANEL* my_panel_3 = pan_create(NULL,0);
		FONT* my_font1 = font_create("Times#35i");  
  		FONT* my_font2 = font_create("Times#30i");   
  	
  		pan_setstring(my_panel_0,0,300,400,my_font1,str_create("Hello, my sweetie!"));
  		pan_setstring(my_panel_1,0,300,450,my_font2,str_create("           Hello.  How are you?"));
  		pan_setstring(my_panel_2,0,300,500,my_font2,str_create("           Get away from me, witch!"));
  		pan_setstring(my_panel_3,0,300,550,my_font2,str_create("           (Ignore)"));
  		
  		wait(13);
  		set(my_panel_0,SHOW);
  		wait(120);
  		set(my_panel_1,SHOW);
  		set(my_panel_2,SHOW);
  		set(my_panel_3,SHOW);
  		
  		

	  	if(mouse_left && my_panel_1)
  		{
		  	beep(); // Debugger
			
 	 		pan_setstring(my_panel_0,0,300,400,my_font1,str_create("I am very well.  Would you like to buy a potion?"));
	  		pan_setstring(my_panel_1,0,300,450,my_font2,str_create("           Yes, I would."));
  			pan_setstring(my_panel_2,0,300,500,my_font2,str_create("           No thank you."));
  			pan_setstring(my_panel_3,0,300,550,my_font2,str_create("           (Ignore)"));
  					
  			wait(13);	
  			set(my_panel_0,SHOW);
  			wait(120);
  			set(my_panel_1,SHOW);
  			set(my_panel_2,SHOW);
  			set(my_panel_3,SHOW);
		}
	}
}

...

action player()
{
	...

	set(my,FLAG2);

	...
}

action castle_witch() // COMMUNICATION SYSTEM STARTEE
{
	my.emask |= ENABLE_CLICK;
	my.event = witch_event;
	
	...
	
	my.STATE = 1;
	
	while (1)
	{  
		// state 1: wait until player comes close enough ////// 
		if(my.STATE == 1) 
		{
			my.ANIMATION += 1*time_step;
			ent_animate(me,"idle",my.ANIMATION,ANM_CYCLE);
			
			c_scan(my.x,my.pan,vector(360,0,150),SCAN_ENTS | SCAN_FLAG2 | IGNORE_ME);
			
			// detect all FLAG2 entities within 750 quants 	
			
			if (you)
			{
				my.STATE = 2;
				
			}
			else
			{
				mouse_map = cursor_pcx;
			}
		
		}
		
		if(my.STATE == 2) // Witch senses player, turns toward player
		{
			my.ANIMATION += 1*time_step;
			ent_animate(me,"idle",my.ANIMATION,ANM_CYCLE);
			
			mouse_map = cursor_green_pcx;
				
			enemy = your.CREATOR;
			
			// get the angle to the enemy			
			VECTOR vDirection;
			ANGLE vTargetAngle;
			var speed = 1;
			vec_diff(vDirection,enemy.x,my.x);
			vec_to_angle(vTargetAngle,vDirection);
			// vAngle is now the angle to the enemy.		
			// Turn right or left depending on the difference
			// between the current and the target pan angle			
			my.pan += (time_step * sign(ang(vTargetAngle.pan - my.pan)) * speed);
		}

		wait(1);
	}
   
}	

...



The text that is supposed to show up when I first left-mouse-click on the witch:
Code:
Hello, my sweetie!
            Hello.  How are you?
            Get away from me, witch!
           (Ignore)


...is actually showing up. However, when I click on the first response (my_panel_1 - "Hello. How are you?"), I do not hear the beep() debugger go off (as given in the code), and nothing happens. If the player left-mouse-clicks the first response (my_panel_1 - "Hello. How are you?") from the text above, I want the text below to replace the text above, as given here:
Code:
I am very well.  Would you like to buy a potion?
           Yes, I would.
           No thank you.
           (Ignore)


Does anyone know why the program is not allowing me to left-mouse-click "my_panel_1" in the first set of text to initiate the action that replaces the first set of text with the second set of text?

Last edited by Ruben; 05/13/14 21:36.