Loading...
 

PogamutUT2004


ObserverConnection doesn't work for me

Hi, even though the ControlConnection works perfectly, I cannot understand why the ObserverConnection doesn't work.

I've only created the two classes as said in the tutorial, I run the Observer and then some bot.

The last line in my Netbeans console is:

!!!!!!! Initialize

so I assume that the listeners aren't called.. :-(

and the last line in my console are:

We are in gained child 2, it is DM-TrainingDay.ObservingConnection
Observing connection established.

Is there any other configuration/setting/code I should modify/add?

Thanks in advance.
Here the solution... Nothing special... just add the line

getAct().act(new Initialize().setName("ResponsiveBot1"));

in the public void initialize() function.

So for example:

1) turn on your Responsive Bot
2) check his name, in my case was ResponsiveBot1, but you could assign a different name....
3) modifity the initialize function as follows:

public void initialize() {

//initialize listeners
getAct().act(new Initialize().setName("ResponsiveBot1"));

getWorldView().addObjectListener(Player.class, WorldObjectUpdatedEvent.class, playerListener);
getWorldView().addObjectListener(Self.class, WorldObjectUpdatedEvent.class, selfListener);

System.out.println("!!!!!!! Initialize");
}

4) turn on the observerConnection project.
5) Look on your Output tab in netbeans:

!!!!!!! Initialize
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
Player: ResponsiveBot1
Observing: ResponsiveBot1
InfoMessagePlayerMessage[Id = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Jmx = service:jmx:rmi:///jndi/rmi://manuele-VPCEA1C5E:48388/server|pogamut:type=agent-standard,name=ResponsiveBot1-3@manuele-VPCEA1C5E_e57dfa0f-3c47-e771-334d-4b241929fde0 | Name = ResponsiveBot1 | Action = null | Visible = false | Rotation = 20.00; 32639.00; 0.00 | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Team = 255 | Weapon = XWeapons.AssaultRifle | Reachable = false | Crouched = false | Firing = 0 | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Jmx = service:jmx:rmi:///jndi/rmi://manuele-VPCEA1C5E:48388/server|pogamut:type=agent-standard,name=ResponsiveBot1-3@manuele-VPCEA1C5E_e57dfa0f-3c47-e771-334d-4b241929fde0 | Name = ResponsiveBot1 | Action = null | Visible = false | Rotation = 20.00; 32639.00; 0.00 | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Team = 255 | Weapon = XWeapons.AssaultRifle | Reachable = false | Crouched = false | Firing = 0 | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]
InfoMessageSelfMessage[Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ][Id = WorldObjectIdSELF_DM-TrainingDay.Observer | BotId = WorldObjectIdDM-TrainingDay.ObservedRemoteBot5 | Name = ResponsiveBot1 | Vehicle = false | Location = 2736.43; -1344.75; -78.15 | Velocity = 0.00; 0.00; 0.00 | Rotation = 20.00; 32639.00; 0.00 | Team = 255 | Weapon = DM-TrainingDay.AssaultRifle | Shooting = false | Health = 100 | PrimaryAmmo = 100 | SecondaryAmmo = 4 | Adrenaline = 0 | Armor = 0 | SmallArmor = 0 | AltFiring = false | Crouched = false | Walking = false | FloorLocation = 2736.43; -1344.75; -127.50 | FloorNormal = -0.00; -0.00; 1.00 | Combo = None | UDamageTime = 0.0 | Action = null | EmotLeft = null | EmotCenter = null | EmotRight = null | Bubble = null | Anim = null | ]


> Hi, even though the ControlConnection works perfectly, I cannot understand why the ObserverConnection doesn't work.
>
> I've only created the two classes as said in the tutorial, I run the Observer and then some bot.
>
> The last line in my Netbeans console is:
>
> !!!!!!! Initialize
>
> so I assume that the listeners aren't called.. :-(
>
> and the last line in my console are:
>
> We are in gained child 2, it is DM-TrainingDay.ObservingConnection
> Observing connection established.
>
> Is there any other configuration/setting/code I should modify/add?
>
> Thanks in advance.
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.