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

Question about the Wait() function of path through Switch

- - - - -

  • Please log in to reply
6 replies to this topic

#1
Mateos

Mateos

    Senior Member

  • Members
  • 1,082 posts
  • LocationFrance

Hello,

 

I was testing this week-end two path through switches which each contain a sleep, but bots seemed to not be willing to wait much...

 

So, I've put some Util.MapDebugPrint in them.

 

I have the bots pushing the buttons, but no print...

 

So I wondered if this either is a normal behaviour or not ^^'

 

If you want to check the related script, it's goldfinger.gm, in incomplete_navs/priority_maps IIRC.

I've increased the Timeout property value for each according to the sleep values + 5 seconds, I guess it could cause troubles.

 

Thank you,

 

Regards,

 

Mateos


mateos1.png


#2
palota

palota

    Senior Member

  • Administrators
  • 523 posts

It is not normal behavior if bots are running inside the elevator and looking up or down. Bots should stand and wait.

The elevator_bottom paththrough is skipped and script is ignored because the waypoint elevator_bottom has door waypoint flag. You must remove the door flag from that waypoint. Then you must split connection and insert a new waypoint with the door flag.

 

There should be only return command in the Wait function:

Wait = function()
{
	return Map.elevatorStatus != "Moving";
},


  • Mateos likes this

#3
Mateos

Mateos

    Senior Member

  • Members
  • 1,082 posts
  • LocationFrance

Thank you very much for the explanation!

 

Perhaps it should be specified in the related Wiki article that this function is only supposed to have a return instruction :)

http://omni-bot.invi...rough_UseSwitch


mateos1.png


#4
Mateos

Mateos

    Senior Member

  • Members
  • 1,082 posts
  • LocationFrance

Right, much better!

 

Though I have a recurrent issue I don't know the origin of: when a bot is at the top, it just keeps pressing the button and nothing else...

 

Joined the current waypoints, with the modified script/way as you indicated. Also done the same to the top connections ofc

Attached Files


mateos1.png


#5
palota

palota

    Senior Member

  • Administrators
  • 523 posts

I fixed the paththrough and committed it to Assembla.


  • d00d and Mateos like this

#6
Mateos

Mateos

    Senior Member

  • Members
  • 1,082 posts
  • LocationFrance

Thank you!

 

I see that you took care of the case when the elevator is in use so the bots getting there wait too

I see as I did you were forced to use

Map.Switches.elevator_top_button.Enabled = false;

so bots stop clicking, but you've differentiated moving up and down, nice!

ExitConditions instruction isn't described in the Wiki ^^'

Have you modified something else in the WAY file?


mateos1.png


#7
palota

palota

    Senior Member

  • Administrators
  • 523 posts

I've modified and added some waypoints at the elevator. I didn't change other areas of the map.


  • Mateos likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users