Jump to content

Welcome to Omni-bot Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

bot.TargetBreakableDist

- - - - - breakable

  • Please log in to reply
8 replies to this topic

#1
VargaTom

VargaTom

    Junior Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNorth of Hungary

Hi,

 

Can anyone tell me more about this topic?
What it means
Bot.TargetBreakableDist = 30.0;
or
RegionTrigger.BreakableDistance.MinBreakableDist = 50;
or
RegionTrigger.BreakableDistance.MaxBreakableDist = 250;
 
How do I set these values correctly?
What to do in case the BOT has to go in vertical line to go down or up and there is a breakable obstacle on the road, for example on a ladder?
How can I ensure that you shoot the breakable obstacle until it breaks and does not run in any other direction?
Can paththrough be used?


#2
palota

palota

    Senior Member

  • Administrators
  • 523 posts

If you set bot.TargetBreakableDist inside OnBotJoin function, then bots will destroy all breakable objects which are closer than the distance.

 

Trigger regions are useful if you want to destroy only a few obstacles and don't want bots to shoot everything. For example, see fueldump.gm.

When a bot enters the region, bot.TargetBreakableDist is set to RegionTrigger.BreakableDistance.MaxBreakableDist.

When a bot exits the region, bot.TargetBreakableDist is set to RegionTrigger.BreakableDistance.MinBreakableDist.

 

Paththrough navigation is necessary for ladders or difficult obstacles. For example, see et_poker_b2.gm.

 


  • d00d, VargaTom and Mateos like this

#3
VargaTom

VargaTom

    Junior Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNorth of Hungary

Thank you for your reply! Is available this map somewhere? (et_poker_b2.pk3)



#4
palota

palota

    Senior Member

  • Administrators
  • 523 posts

You can download et_poker_b2 from enemyterritory-stuff.net


  • VargaTom likes this

#5
Mateos

Mateos

    Senior Member

  • Members
  • 1,082 posts
  • LocationFrance

For reference regarding the distance: http://omni-bot.invi..._Reference#dist

 

Not sure about this one: http://omni-bot.invi...ference#aim_pos


  • VargaTom likes this

mateos1.png


#6
VargaTom

VargaTom

    Junior Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNorth of Hungary

In this script (et_poker_b2 at the no. 96 line) the first three coordinates are paththrough x_hole waypoint coordinates or something else?

x_hole = {
	EvalFunc = function(t){
	   return !Map.breakable_x_hole;	
        },
	navigate = function(t){
	   Map.DestroyBreakable(t, Vec3(1.525, 2153.875, -256.125), Vec3(0.019, 0.561, 0.828));
	}
},

Then at No. 48 line

ent = TraceLine( position, position + 200*facing, 0, TRACE.SHOT, _this.Bot.GetGameId(), false ).entity;

what means position + 200*facing, ?



#7
palota

palota

    Senior Member

  • Administrators
  • 523 posts

The first Vec3 are paththrough waypoint coordinates.

The second Vec3 is bot's facing (aim direction).

Number 200 is line length. The line must be long enough so that it intersects a breakable entity. Expression (position + 200*facing) means line end point.


  • VargaTom and Mateos like this

#8
VargaTom

VargaTom

    Junior Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNorth of Hungary

I raised the first half of my question because I found out that when I put a waypoint,  then later I return with the /bot wt (waypoint guid) command I would not be in same position when I put the way point. Slightly higher like original position. TIt is true if I standing on a vertical ladder.

 

I have an other problem with breakable obstacle.

I would like following: If a BOT arrive to Paththrough stand in one place for 3 second while he crouch and destroy a wood obstacle with his knife.

Navigation =
{
   wood_obstacle =
   {
      navigate = function(_this)
      {
         _this.Bot.ReleaseButton(BUTTON.FORWARD);
         _this.AddWeaponRequest(Priority.Veryhigh,  WEAPON.KNIFE);
         _this.BlockForWeaponChange(WEAPON.KNIFE);
         _this.AddAimrequest(Priority.High, "facing", Vec3(-83.875, 1879.912, -91.724));
         _this.Bot.HoldButton(BTN.CROUCH, BTN.ATTACK1, 3.0);
         sleep(3.0);
      },
   },
},

But it is dos'n work because BOT walk to the paththrough waypoint and go on without stopping. Why do not stop he for 3 seconds and why do not attack  wood obstacle bar under his boots?



#9
Mateos

Mateos

    Senior Member

  • Members
  • 1,082 posts
  • LocationFrance

If you want the bot to stop moving, you can use GoTo; see secret_room_outside in:

http://svn.assembla....waben_final2.gm


  • VargaTom and Native12 like this

mateos1.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users