| Author | 
			Message | 
		
	
	
	
		| 
			
			angelatheist
		 | 
		
			
			
			
				 Post subject: Specific Bug    Posted: Sun Mar 21, 2010 10:39 am    | 
			 
			 
		 | 
	
	
		
			
			
				 Joined: Mon Mar 02, 2009 11:00 am Posts: 150
			
		 | 
		
			
			
				| 
				
					 When the game starts out with creatures/buildings placed on the map the players do not get any vision for them.  This persists until one player plays a card or controls a flux well at end of round.  
  Also I don't really understand how I can use forEachEntity() and entityCallback(); an example with them would be helpful. 
				
					 _________________ ȁ̎̉̈̂̎͋̈́̍n͂͑̿ͥͣ́̓ġͤ͑ͯe͌̓̊ͩ͗̅l̽̓ͬͬͥ̊͗aͣ̔̃ͧ̓̾̾t͊̑̆hͤ͆̓̉̌ͣ̚e̋ͩ͒̈́ĭ̌̒̎ͧ̓̋ͪs̋ͤͧ̅̇̋̎ͫ̂̾ͨ̽̄ͫͯt͒͐̌ͭ̂̃ͪ̽ͣ͗̒ͣ 
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	
	
		| 
			
			jed
		 | 
		
			
			
			
				 Post subject: Re: Specific Bug    Posted: Sun Mar 21, 2010 12:11 pm    | 
			 
			 
		 | 
	
	
		
			
			
				 Joined: Tue Jan 08, 2008 2:07 am Posts: 1045
			
		 | 
		
			
			
				
				
					ok I'll fix the vision bug. I added an example of using entityCallback to the wiki. This is it: Code: // Using entityCallback // This removes the oldest building each round void onNewRound() {    forEachEntity(); // loop through all the Entities  }
  bool entityCallback(Entity ent) {    if(ent.isType(2)) // Is it a building    {       ent.remove();       return(false); // don't need to call entityCallback anymore    }       return(true); // we haven't found a building yet so keep checking }
   
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	
	
		| 
			
			angelatheist
		 | 
		
			
			
			
				 Post subject: Re: Specific Bug    Posted: Sun Mar 21, 2010 10:15 pm    | 
			 
			 
		 | 
	
	
		
			
			
				 Joined: Mon Mar 02, 2009 11:00 am Posts: 150
			
		 | 
		
			
			
				| 
				
					 ok thanks i think i get it now, however i found some more bugs
  whenever the script places an entity that has a ' in its name it only works if the deck that player is using actually contained that card.  
  Is there some way to test which player controls a card; I tried ent.getController()==getHumanPlayer(0) but it gave me a compile error. 
				
					 _________________ ȁ̎̉̈̂̎͋̈́̍n͂͑̿ͥͣ́̓ġͤ͑ͯe͌̓̊ͩ͗̅l̽̓ͬͬͥ̊͗aͣ̔̃ͧ̓̾̾t͊̑̆hͤ͆̓̉̌ͣ̚e̋ͩ͒̈́ĭ̌̒̎ͧ̓̋ͪs̋ͤͧ̅̇̋̎ͫ̂̾ͨ̽̄ͫͯt͒͐̌ͭ̂̃ͪ̽ͣ͗̒ͣ 
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	
	
		| 
			
			Altren
		 | 
		
			
			
			
				 Post subject: Re: Specific Bug    Posted: Sun Mar 21, 2010 11:06 pm    | 
			 
			 
		 | 
	
	
		
			
			
			  |  
			
			| Lead Developer |  
			
			  |  
			
			 
			
				 Joined: Mon Mar 31, 2008 9:55 pm Posts: 717 Location: Moscow, Russia
			
		 | 
		
			
			
				| 
				
					 ent.getController()==getHumanPlayer(0)
  Hmm, that should work. What error did it gave? 
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	
	
		| 
			
			angelatheist
		 | 
		
			
			
			
				 Post subject: Re: Specific Bug    Posted: Mon Mar 22, 2010 12:57 am    | 
			 
			 
		 | 
	
	
		
			
			
				 Joined: Mon Mar 02, 2009 11:00 am Posts: 150
			
		 | 
		
			
			
				| 
				
					 i get "No matching operator that takes the types 'Player&' and 'Player&' found" and "Expression must be of boolean type" when using the code in an if statement 
				
					 _________________ ȁ̎̉̈̂̎͋̈́̍n͂͑̿ͥͣ́̓ġͤ͑ͯe͌̓̊ͩ͗̅l̽̓ͬͬͥ̊͗aͣ̔̃ͧ̓̾̾t͊̑̆hͤ͆̓̉̌ͣ̚e̋ͩ͒̈́ĭ̌̒̎ͧ̓̋ͪs̋ͤͧ̅̇̋̎ͫ̂̾ͨ̽̄ͫͯt͒͐̌ͭ̂̃ͪ̽ͣ͗̒ͣ 
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	
	
		| 
			
			jed
		 | 
		
			
			
			
				 Post subject: Re: Specific Bug    Posted: Mon Mar 22, 2010 2:00 am    | 
			 
			 
		 | 
	
	
		
			
			
				 Joined: Tue Jan 08, 2008 2:07 am Posts: 1045
			
		 | 
		
			
			
				| 
				
					 Oh yeah I need to expose the comparison for all these objects. 
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	
	
		| 
			
			jed
		 | 
		
			
			
			
				 Post subject: Re: Specific Bug    Posted: Mon Mar 22, 2010 2:50 pm    | 
			 
			 
		 | 
	
	
		
			
			
				 Joined: Tue Jan 08, 2008 2:07 am Posts: 1045
			
		 | 
		
			
			
				| 
				
					 ok both those problems should be fixed 
				
  
					
				 | 
			 
			 
		 | 
	
	
		    | 
		     | 
	
	
	  | 
	 |