[Pogamut-list] Threads

fireball787b pogamut-forum at diana.ms.mff.cuni.cz
Mon Mar 4 23:53:25 CET 2013


Re: Threads

Author: fireball787b

Good night!

I'm still trying to stop the bots but i don't get it ^^'

I tried with new WaitForAgentStateChange(((SmartBot)botInstances.get(i).getController()).pause(), AgentStatePaused.class).await();

but (SmartBot)botInstances.get..... returns void insted of void (WaitForAgentStateChange arg #1 has to be null).

So i decided to try this other way, which first argument is null but then the bots doesn't stop. (i understand that bots should stop moving while im inside the game)

new WaitForAgentStateChange(((SmartBot)botInstances.get(i).getController()).getState(), AgentStatePaused.class).await();
I also realized that when the masterbot tries thi method (...getState()). he gets stuck here forever, it's like he's waiting for the ther bots to get paused.

Coul you help me?

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