| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| MADSOFT Games Representing more than 80% of the internet!
 
 
 
  
 Joined: 06 Nov 2004
 Posts: 221
 Location: AWESOME land
 
 | 
			
				|  Posted: Sat Nov 18, 2006 11:15 pm    Post subject: What's wrong with this? |   |  
				| 
 |  
				| This is part of the script for Drums OHR, and it's not working, at some point it almost did, (it played the sound and showed the image, but only once and didn't work ever again, I tried recompiling and reimporting, but nothing works... Here's the  script, basically it's all repeated 12 times (one for each Drum sound):
 
 
  	  | Quote: |  	  | Script,drums,begin if (Key is pressed (31))
 then,
 (
 show backdrop (2)
 Play song (2)
 Wait (5)
 Stop song
 Show map
 )
 end
 | 
 
 It's not like it's such a complicated script, help plz?
 _________________
 http://www.madsoftgames.net/
 http://www.madsoftgames.org/
 http://www.andrewdavid.net/
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| TMC On the Verge of Insanity
 
 
 
 
 Joined: 05 Apr 2003
 Posts: 3240
 Location: Matakana
 
 | 
			
				|  Posted: Sun Nov 19, 2006 4:46 pm    Post subject: |   |  
				| 
 |  
				| So, do you mean you have 32 if(keyispressed) blocks, each with a different sound and backdrop and none of them work? Do you have it set to the onkeypress script? 
 Could you explain what happens when you run it? Nothing at all?
 _________________
 "It is so great it is insanely great."
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Camdog 
 
 
 
 Joined: 08 Aug 2003
 Posts: 606
 
 
 | 
			
				|  Posted: Sun Nov 19, 2006 9:20 pm    Post subject: |   |  
				| 
 |  
				| It could be that you need a while loop in it.  I assume you're calling this from another script (as a bunch of scripts can't be assigned to the same "special" plotscript function, like onkeypress).  Does that script call this script continuously in aloop?  As it stands now, the script will check to see if the key is pressed exactly once, play the sounds and show the backdrop if it is, do nothing if not, and promptly stop and never check for keypresses again. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |