[Pogamut-list] Feedback, Things that don't work properly and things that should be included

aisa87 pogamut-forum at diana.ms.mff.cuni.cz
Sun Apr 17 19:09:19 CEST 2011


Re: Feedback, Things that don't work properly and things that should be included

Author: aisa87

Hi,

I was coding a listener to blow combos (shock-combos) if the player was closer to a shock-ball than a certain distance. I noticed that it just worked if I was close to the bot. Because it was a bit weird, I decided to check out what was happening within the listener. So I did the following:

   @ObjectClassEventListener(eventClass = WorldObjectUpdatedEvent.class, objectClass = IncomingProjectile.class)
    protected void incomingProjectile(WorldObjectUpdatedEvent event) {
        IncomingProjectile cucumber = event.getObject();

        body.getCommunication().sendGlobalTextMessage("x = " + cucumber.getLocation().x + ", y = " + cucumber.getLocation().y + ", z = " + cucumber.getLocation().z);
    }

If you execute that code, you'll see that the location of the projectile don't get updated. The bot sends a message the first time he sees the projectile, but he doesn't update the info about the projectile. WorldObjectAppearedEvent doesn't work with IncomingProjectile.class. So, how can I get updated information about projectiles?

Another question, how can I run backwards?

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





More information about the Pogamut-list mailing list