theFarWilds.com
http://redmine.mygui.info/forum/

Specific Bug
http://redmine.mygui.info/forum/viewtopic.php?f=14&t=1763
Page 1 of 1

Author:  angelatheist [ Sun Mar 21, 2010 10:39 am ]
Post subject:  Specific Bug

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.

Author:  jed [ Sun Mar 21, 2010 12:11 pm ]
Post subject:  Re: Specific Bug

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
}

Author:  angelatheist [ Sun Mar 21, 2010 10:15 pm ]
Post subject:  Re: Specific Bug

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.

Author:  Altren [ Sun Mar 21, 2010 11:06 pm ]
Post subject:  Re: Specific Bug

ent.getController()==getHumanPlayer(0)

Hmm, that should work. What error did it gave?

Author:  angelatheist [ Mon Mar 22, 2010 12:57 am ]
Post subject:  Re: Specific Bug

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

Author:  jed [ Mon Mar 22, 2010 2:00 am ]
Post subject:  Re: Specific Bug

Oh yeah I need to expose the comparison for all these objects.

Author:  jed [ Mon Mar 22, 2010 2:50 pm ]
Post subject:  Re: Specific Bug

ok both those problems should be fixed

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/