Page 1 of 1
		
			
				Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 2:22 pmby mcavalcanti
				Hello, guys.
  I have three doors that constantly "produces" enemies. In the in-game version, it's ok, but in the Windows executable version, only one door works.
View: Create:  
- Code: Select all
- CreateActor("door", "door", "(none)", "(none)", 0, -300, true);
 CreateActor("door", "door", "(none)", "(none)", -200, -300, true);
 CreateActor("door", "door", "(none)", "(none)", 200, -300, true);
 
Door: Timer:
- Code: Select all
- CreateActor("enemy", "enemy", "(none)", "(none)", 0, 0, false); num+=1;
 
  Please, what can I do to fix it? Thanks.
 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 5:18 pmby skydereign
				How do you create the timer? It sounds like you might be setting the timer for only the first door.
			 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 5:18 pmby Troodon
				Maybe only the first door creates the timer?
edit: Skydereign was faster than me.
			 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 5:39 pmby mcavalcanti
				The timer was created using door's Create Actor event.
Door > Create Actor > Create Timer > enemyGeneratorThen enemyGenerator has an actor var with a Rand to define the enemy type:
- Code: Select all
- enemyChoose=rand(2);
 if(enemyChoose==0){CreateActor("enemy0", "enemy0", "(none)", "(none)", 0, 0, false); num+=1;}
 else if(enemyChoose==1){CreateActor("enemy1", "enemy1", "(none)", "(none)", 0, 0, false); num+=1;}
 else if(enemyChoose==2){CreateActor("enemy2", "enemy2", "(none)", "(none)", 0, 0, false); num+=1;}
 
Remembering it is working fine in the editor, but not in the exe. :/
 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 5:50 pmby skydereign
				Odd. The usual reason for something only working in the editor is if the code is relying on something that assumes the actor already already exists while the exe has to create it up, but it seems that isn't the case this time. Not really sure then. Try adding something to the timer event that isn't the CreateActor that way you can see if the timer event is at all triggering in the exe.
			 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 6:43 pmby mcavalcanti
				I changed the CreateActor to PlaySound2 and the result is the same. No loud sounds. Only one sound instance playing.
Is there necessity to use that *getclone2 function?
			 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Wed Feb 01, 2012 11:01 pmby skydereign
				That shouldn't necessary as long as you create the timer and choose "Event Actor". Try exporting this ged. It should be similar to what you have, though I did put the CreateTimer into the script editor.
			 
			
		
			
				Re: Object does not work correctly in executable version
				
Posted: 
Fri Feb 03, 2012 1:00 pmby mcavalcanti
				Sorry about the dealy. Yeah, now it seems to be Ok. Thanks. 
