[Pogamut-list] Threads

fireball787b pogamut-forum at diana.ms.mff.cuni.cz
Tue Mar 5 09:40:46 CET 2013


Re: Threads

Author: fireball787b

Of course!

//i get the bot instantces in main
public static void main(String args[]) throws PogamutException {
botInstances = new UT2004BotRunner(SmartBot.class, "SmartBot").setMain(false).startAgents(num_bots);
new UT2004BotRunner(SmartBot.class, "MasterBot").setMain(true).startAgent();
}

//in the logic module
if((bot.getName()).contains("MasterBot"))
{ 
for(int i = 0; i < num_bots; i++)                        
await = new WaitForAgentStateChange(((SmartBot)botInstances.get(i).getController()).getBot().getState(), IAgentStatePaused.class).await();
}

Thanks,
Joan Marc.

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=6&comments_reply_threadId=6&comments_parentId=1134&post_reply=1#form>




More information about the Pogamut-list mailing list