Loading...
 

PogamutUT2004


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

  • The rocket-launcher has an alternate fire that gives you the ability to fire 2 or 3 rockets in an spiral.
As a user, you have to do the following: Charge 2 or 3 rockets by keeping pressed "right-click" then while pressed make a left-click and then stop pressing.

http://www.youtube.com/watch?v=wNB--gUkvE0

Skip to 2:00

  • Sometimes to get to some spot that is higher, you can use the hammer by jumping and the shooting against the floor with the primary fire charged:

http://www.youtube.com/watch?v=wNB--gUkvE0

Skip to 3:48

I have tried it by doing move.jump() and then shooting to the floor, using the method that gets the floor location, but it doesn't work, probably because I've put it in the logic.

  • When you get hit an enemy the method that tells with which weapon you hit the enemy is not working. The string it should return is empty. I am talking about getWeaponName() on BotDamaged.

  • I currently don't know how to make a shock-combo:

http://www.youtube.com/watch?v=wNB--gUkvE0

Skip to 3:59

How to do it: shoot with the secondary using the shock-rifle, then shoot to the purple-ball with the primary fire of the shock rifle.

We could do it easily, if there was a way to know the position of the purple balls that we through.


And that's it by now (:
> * The rocket-launcher has an alternate fire that gives you the ability to fire 2 or 3 rockets in an spiral.
> As a user, you have to do the following: Charge 2 or 3 rockets by keeping pressed "right-click" then while pressed make a left-click and then stop pressing.

Yep, I know. This currently does not work for bots - it was simply not implemented due to low priority.. :-) I'll look into it (it should be easy to add it).

> * Sometimes to get to some spot that is higher, you can use the hammer by jumping and the shooting against the floor with the primary fire charged:

This probably can be done, but it will be a little bit tricky - you need really good timing for this (this may be a problem to do with our bots) :-/

> * When you get hit an enemy the method that tells with which weapon you hit the enemy is not working. The string it should return is empty. I am talking about getWeaponName() on BotDamaged.

Hm, that's weird. But anyway you can get the current weapon the bot is using by calling info.getCurrentWeapon() or querying the weaponry module.

> * I currently don't know how to make a shock-combo:

It is possible to get the position of slow puprple shock rifle projectile. You need to make listener on IncomingProjectile message. The time is important here though, so maybe you will need to compute the exact location of the projectile (but the time, location and direction of the projectile are available in the message, so it should be possible).

Best,
Michal
About the getWeaponName(), yup, I am currently using getCurrentWeapon() to know which weapon I used.

Another thing that could be reaaaaaally usefull is, to know if you can reach a certain Location with a weapon. For example, if I am in rankin and I sense that someone just took the 50-shield, if I'm close, I may be able to shoot with the secondary fire of the flak to that location, but I just want to do it, if I know I can hit that location from my current position.
Incoming projectile is not working for me, whether I use eventListener or not:

@EventListener(eventClass = IncomingProjectile.class)
protected void shockCombo (IncomingProjectile event) {
body.getCommunication().sendGlobalTextMessage("I see something");
}

It never says anything. And if I do it through senses on the logic block, it doesn't work ):

And as for the NavPoints, I retreived all of the NavPoints in Rankin, and none of them are roamingSpots, snipingSpots or AIMarkers, I believe there's something wrong there, because I guess that the roaming state in Unreal Scripting is based on those for each level. The only ones that did work were jump spots.
Hi!

Sure, this is one thing that should be corrected. Not that it is not working, but the thing that it does not throw EXCEPTION at you.

IncomingProjectile is an object, thus you need to use @ObjectClassEventListener

See ResponsiveBot for the example with player:
"""
@ObjectClassEventListener(eventClass = WorldObjectAppearedEvent.class, objectClass = Player.class)
protected void playerAppeared(WorldObjectAppearedEvent<Player> event) {
// greet player when he appears
body.getCommunication().sendGlobalTextMessage("Hello " + event.getObject().getName() + "!");
}
"""

Cheers!
Jimmy
So, in other words, I should code the bot in a different way, because I won't be able to get the roaming spots in any map, am I right?
No, I don't think so.

1) we're not sure why it is all false

2) but truth is that these info is TOTALLY DEPENDENT on the navigation graph that is stored along the map

3) therefore, if the info was not manually added to the navigation graph (i.e., via UnrealEd), it can't be there!

We'll investigate it further, but it may be, that roaming spots are very scarse in maps, but you could alter the map
for yourself and alter navigation point to be sure that it has roaming spots.

Best,
Jimmy
I thought that, that was the method that bots in UT were using to go through the whole level. Is there any tutorial on UnrealEd that says how to change that navigation graph, so I can add some roaming spots?

Thanks! ^^
I've made a listener for the shock-combo, but it doesn't make the combo blow.. it actually doesn't shoot most of the times. I tried the following:

  • In the logic block

if (players.canSeeEnemies()) {
// If you don't have the shock rifle equiped, then do it!
if (!weaponry.getCurrentWeapon().getType().equals(ItemType.SHOCK_RIFLE)) {
weaponry.changeWeapon(ItemType.SHOCK_RIFLE);
}

// Throw a shock ball to your nearest enemy
shoot.shootSecondary(players.getNearestVisibleEnemy());
}
else {
shoot.stopShooting ();
}

  • Listener code

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

if (players.canSeeEnemies()) {
// If distance from ball-shock to enemy is lower than 800 then hit the ball
if (players.getNearestVisibleEnemy().getLocation().getDistance(shockBall.getLocation()) < 800) {
shoot.shootPrimary(shockBall.getId());
}
}
}

I tried putting some global messages inside the part where the bot is supposed to shoot the ball (to see if it was a problem with the distance function), and I get the message correctly, the problem is, he almost never shoots.
Hi!

The problem is probably with "firing timing" and "issueing two SHOOT commands at once" ...

1) when you send SHOOT command to ID1 and then
2) send SHOOT command to ID2

Than the GB2004 won't "stack" those commands, but second shoot command will override the first.
Which might be the case as in the Logic you're issuing additional SHOOT commands.

You will have to FORBID shooting in logic for some time in order to ensure that your weapon will fire.

========

Regarding updates, you will need to work with "SNAPSHOT" version of the Pogamut in order
to stay on the bleeding edge of tech ;-) ... i.e., using the most recent builds of Pogamuts.

Edit pom.xml file and find version of parentPom and change it to 3.2.2-SNAPSHOT.
But note that it might break your project sometime as SNAPSHOT version can't be considered stable.

Also update often your GameBots2004.u as you're saying.

Best,
Jimmy & Michal
I updated GameBots2004.u but NetBeans doesn't find methods for making wall-jumps or double-dodges. So please, could you at least give me an example of how to make a double-dodge or a wall jump through act.act (new ....) ?

That way I'll see for sure how to do it properly and if it's a problem with the .u file or just that I'm not doing it properly. Thanks.
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?
The method that tells how much ammo you have from a certain weapon, is not working for the Shield Gun in the following situation.

If you check how much ammo the shield gun has like this: weaponry.getAmmo(ItemType.SHIELD_GUN); it should say from the beginning it has 100 (sometimes it always says it has 0 :-S)

After checking the ammo, if you change the weapon you are holding, lets say you switch to the Assault Rifle ( weaponry.changeWeapon(ItemType.ASSAULT_RIFLE); ) and now you check back the ammo of the Shield Gun it gets stuck, it does not recharge the ammo it had.

I noticed this, because I'm telling the bot to use the shield (secondary fire) to run from the user if he is hit; Whenever he runs out of ammo, he switches to the best combat weapon and waits for the shield to have at least 50 ammo. But when I switch to the best combat weapon, it says that the shield gun has 0 ammo all the time, and unless he gest killed, it doesn't go back to 100.

Hope you can help me. (:

> Another question, how can I run backwards?

This question is easy enough to answer, but the answer is annoying:
You have to use the strafing movement commands to move the bot to a point directly behind it while
telling it to look at a point directly in front of it.
Thanks, I already solved that a few days ago. I created a huge AutoTraceRay. So whenever I want to go backwards I just strafe to the hit location with the focus location I want, and yes, it's very annoying.
This is absolutely not necessary for the thing you want to do. To set focus point to someting in Front of the bot just compute it from bots location and rotation attributes:

//computes focus point 500 ut units = 500 cm in front of the bot
			Location startLoc = info.getLocation();
			Location directionVector = self.getRotation().toLocation().getNormalized();
                        Location focusInFront = startLoc.add(directionVector.scale(500));


Find some examples online how to compute vectors and directions: e.g. http://www.unrealtexture.com/Unreal/Downloads/3DEditing/UnrealEd/Tutorials/unrealwiki-offline/unrealscript-vector-maths.html

(vector corresponds to Location, VSize corresponds to .size() , cross corresponds to .cross(), dot corresponds to .dot(), + to .add(), - to .sub(), normal to .getNormalized())

Note: If you call in pogamut myLoc.getNormalized() this means that it will return the new value as a result of this operation and this WILL NOT change the myLoc variable attribute. If you want to change the myLoc variable do it like this: myLoc = myLoc.getNormalized();

Best,
Michal
 

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.