Posts: 18 
	Threads: 3 
	Joined: Aug 2019
	
	 
 
	
		
		
  
		10-26-2019, 10:20 PM 
(This post was last modified: 10-26-2019, 10:21 PM by Pelip.)
	
	 
	
		So basically, I have a little common event that runs commands depending on which number key you press, and I wanted to enable it only if there's not message windows, or maybe to make it to force to shut all the message windows, but how I do that? 
 
 I tried to put the commands in a conditional branch with the script "$scene != Window_Message.new" but it didn't work. I mean, the game keeps doing the commands even if there's a message window, so it's like if the game ignored that code for some reason.
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 4,971 
	Threads: 611 
	Joined: Dec 2009
	
	 
 
	
		
		
		10-27-2019, 12:06 AM 
(This post was last modified: 10-27-2019, 12:09 AM by kyonides.
 Edit Reason: Added another useful condition
)
	
	 
	
		You could try something like... 
$game_temp.message_window_showing = false
 
...or add a snippet...
 Code: class Window_Message 
  alias :forum_request_win_mess_up :update 
  def update 
    forum_request_win_mess_up 
    return unless @contents_showing and $game_temp.common_event_id > 0 
    if Input.trigger?(Input::BUTTON) or Input.trigger?(Input::ANOTHER_BUTTON) 
      terminate_message 
    end 
  end 
end
 
There you need to replace BUTTON and ANOTHER_BUTTON with the actual names of the buttons you will use. You don't know what are their names!? Then Take a look at the window that opens whenever you press F1! There you can find all of them.
	  
	
	
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
  
 
 
 
 
My Original Stories (available in English and Spanish)
 
List of Compiled Binary Executables I have published...
 HiddenChest &  Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!   
Just some scripts I've already published on the board...
 KyoGemBoost XP VX & ACE,  RandomEnkounters XP,  KSkillShop XP,  Kolloseum States XP,  KEvents XP,  KScenario XP & Gosu,  KyoPrizeShop XP Mangostan,  Kuests XP,  KyoDiscounts XP VX, ACE & MV,  KChest XP VX & ACE 2016,  KTelePort XP,  KSkillMax XP & VX & ACE,  Gem Roulette XP VX & VX Ace,  KRespawnPoint XP, VX & VX Ace,  GiveAway XP VX & ACE,  Klearance XP VX & ACE,  KUnits XP VX, ACE & Gosu 2017,  KLevel XP,  KRumors XP & ACE,  KMonsterPals XP VX & ACE,  KStatsRefill XP VX & ACE,  KLotto XP VX & ACE,  KItemDesc XP & VX,  KPocket XP & VX,  OpenChest XP VX & ACE
 
	
	
 
 
	
	
	
		
	Posts: 18 
	Threads: 3 
	Joined: Aug 2019
	
	 
 
	
	
		 (10-27-2019, 12:06 AM)kyonides Wrote:  You could try something like... 
 
$game_temp.message_window_showing = false 
 
...or add a snippet... 
 
Code: class Window_Message 
  alias :forum_request_win_mess_up :update 
  def update 
    forum_request_win_mess_up 
    return unless @contents_showing and $game_temp.common_event_id > 0 
    if Input.trigger?(Input::BUTTON) or Input.trigger?(Input::ANOTHER_BUTTON) 
      terminate_message 
    end 
  end 
end
  
There you need to replace BUTTON and ANOTHER_BUTTON with the actual names of the buttons you will use. You don't know what are their names!? Then Take a look at the window that opens whenever you press F1! There you can find all of them. 
I dunno if it's compatible with UMS and some other scripts I have, also the keys are from a keyboard script. So it's more simple if i simply check if there's a message window showing.
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 4,971 
	Threads: 611 
	Joined: Dec 2009
	
	 
 
	
	
		Then replace Input::BUTTON and Input::ANOTHER_BUTTON with those found in such script.
	 
	
	
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
  
 
 
 
 
My Original Stories (available in English and Spanish)
 
List of Compiled Binary Executables I have published...
 HiddenChest &  Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!   
Just some scripts I've already published on the board...
 KyoGemBoost XP VX & ACE,  RandomEnkounters XP,  KSkillShop XP,  Kolloseum States XP,  KEvents XP,  KScenario XP & Gosu,  KyoPrizeShop XP Mangostan,  Kuests XP,  KyoDiscounts XP VX, ACE & MV,  KChest XP VX & ACE 2016,  KTelePort XP,  KSkillMax XP & VX & ACE,  Gem Roulette XP VX & VX Ace,  KRespawnPoint XP, VX & VX Ace,  GiveAway XP VX & ACE,  Klearance XP VX & ACE,  KUnits XP VX, ACE & Gosu 2017,  KLevel XP,  KRumors XP & ACE,  KMonsterPals XP VX & ACE,  KStatsRefill XP VX & ACE,  KLotto XP VX & ACE,  KItemDesc XP & VX,  KPocket XP & VX,  OpenChest XP VX & ACE
 
	
	
 
 
	
	
	
		
	Posts: 18 
	Threads: 3 
	Joined: Aug 2019
	
	 
 
	
		
		
		11-01-2019, 04:57 PM 
(This post was last modified: 11-01-2019, 05:00 PM by Pelip.)
	
	 
	
		 (10-27-2019, 10:33 PM)kyonides Wrote:  Then replace Input::BUTTON and Input::ANOTHER_BUTTON with those found in such script. 
I also said that i don't know if UMS it's compatible, and if I interrupt a message the event keeps going and it shows the other one that it's next it. Really, I'd prefer to use the other method instead, can someone tell me how to check if there's a message window then?
 
Or maybe to enable a switch everytime a message window is shown and disable it everytime it will be disposed.
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 4,971 
	Threads: 611 
	Joined: Dec 2009
	
	 
 
	
		
		
		11-01-2019, 11:41 PM 
(This post was last modified: 11-01-2019, 11:42 PM by kyonides.)
	
	 
	
		I know you think that might be better for you, and probably it'd be... The issue here is that there are times where you can only rely on scripts to alter the default behavior of the engine. I should yell this at you to let you understand what it means, but I'll try to be nice here.    You or any if the scripters can make it compatible with any script if given the chance and enough data to work with. What I suggested some time ago isn't complicated... for a scripter at least.
 
If you plan to use such feature only once, perhaps it'd be better for you to use an event or common event. Otherwise a script should care of it to avoid getting a cluttered event that gets hard to get debugged. And nope, I don't focus on eventing.   
	 
	
	
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
  
 
 
 
 
My Original Stories (available in English and Spanish)
 
List of Compiled Binary Executables I have published...
 HiddenChest &  Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!   
Just some scripts I've already published on the board...
 KyoGemBoost XP VX & ACE,  RandomEnkounters XP,  KSkillShop XP,  Kolloseum States XP,  KEvents XP,  KScenario XP & Gosu,  KyoPrizeShop XP Mangostan,  Kuests XP,  KyoDiscounts XP VX, ACE & MV,  KChest XP VX & ACE 2016,  KTelePort XP,  KSkillMax XP & VX & ACE,  Gem Roulette XP VX & VX Ace,  KRespawnPoint XP, VX & VX Ace,  GiveAway XP VX & ACE,  Klearance XP VX & ACE,  KUnits XP VX, ACE & Gosu 2017,  KLevel XP,  KRumors XP & ACE,  KMonsterPals XP VX & ACE,  KStatsRefill XP VX & ACE,  KLotto XP VX & ACE,  KItemDesc XP & VX,  KPocket XP & VX,  OpenChest XP VX & ACE
 
	
	
 
 
	
	
	
		
	Posts: 11,569 
	Threads: 672 
	Joined: May 2009
	
	 
 
	
	
		Let's not over-analyze this.  If you just want to make some action work in an event, consider this bit of code.... 
Code: @>Conditional Branch: Script: $game_temp.message_window_showing != true 
    @> Play SE: '032-Switch01' 80, 100 
    @> Wait 20 frame(s) 
    @> 
: Branch End 
@>
 
This plays the Tick sound effect and throws up a 20frame delay afterwards, but it only runs IF the message window is not showing.  This example SHOULD work with ccoa's UMS as it  still uses the message_window_showing value in Game_Temp.
	  
	
	
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
  Above are clickable links 
 
	
	
 
 
	 
 |