Mateos Posted July 5 Share Posted July 5 Good afternoon, I'm going through Chateau Voilegarde waypoints again, and I'm going through the button-commanded doors for Axis, so they get as quick as possible where they're needed I've noticed there's a delay between the console prints you have with `bot debugtriggers on` and the call of the OB trigger bound to it, where I change the door status, which is used in the ExitConditions (the table where you tell the bot to stop trying to click the button) The issue here is that these buttons can be spammed, which resets the door animation... The spamming stopping after the switch script table timeout Tried to play with timeout to see if it could help (initially 3000, tried 1000/750/150, kept 1000), but it quickly gets messy when it's crowded I'm using the door goto event to tell if it's opening or closing, the button has its own events since it moves, but since the events of both the button and the door are fired at once through the console command, I guess it's fine? I've attached my current waypoints, with the door near Axis Laboratory spawn scripted; Axis will spawn there and go through the path through switch when the Courtyard flag is owned by Allies, since it is the shortest path to get back to the flag Map download: https://www.wolffiles.de/index.php?filebase&fid=224 Thank you in advance Chateau Voilegarde Waypoints.zip Quote Link to comment Share on other sites More sharing options...
TomekKromek Posted July 5 Share Posted July 5 voilegarde_b3.gm That's my solution. Not the cleanest solution but from my testing it works. For checking if the doors are opening and eventually opened I use "rightlabdoor_button_Moving". Check Right_Lab_Door_Moving2 to see what I did there. Mateos 1 Quote Link to comment Share on other sites More sharing options...
Mateos Posted July 5 Author Share Posted July 5 (edited) I think, using your solution with 2 triggers, only moving Map.Switches.right_lab_door.Enabled = false; before the sleep( 1.25 ); is enough, and that makes the ExitCondition table useless, and seems to work yeah Was hoping for a working single-trigger solution, but heh Here's the merged work: voilegarde_b3.gm Edited July 5 by Mateos Attached merged script Quote Link to comment Share on other sites More sharing options...
Moderators palota Posted July 5 Moderators Share Posted July 5 8 hours ago, Mateos said: I've noticed there's a delay between the console prints you have with `bot debugtriggers on` and the call of the OB trigger bound to it. There is not delay between map trigger and OB script trigger. There's delay between map triggers "rightlabdoor_button_Moving" and "rightlabdoor_goto". Quote Link to comment Share on other sites More sharing options...
Mateos Posted July 6 Author Share Posted July 6 (edited) What I did is watching the console and set a debug print at the top of the trigger OB script side I had the debugtriggers prints (all at once, thus making me think just use the one having a velocity, to know if the door is either opening or closing, since the button event is twice 'opening' on both events), then a delay before the debug print, that's what made me think there were a delay I've followed the wiki page about path through switch, but it seems, as did Tomek, that moving the Enabled false from 'after the Opening/Opened' to 'before' helps forcing bots stop using the button, even though the condition in ExitConditions looks right (first instruction of trigger is to change door status from Closed (0) to Opening (1), and ExitConditions tests status > Closed, just like in the wiki) IIRC most of OB is single-threaded, perhaps it stays somehow stuck in ExitConditions, and thus the status switch happens later; and as the map author did not protect the button from spamming, it gets the whole thing stuck; but why would setting Enabled to false would then make it react so quickly? I'm not sure to understand the flow; perhaps the issue here is only that the button is unprotected by map author, contrary to some other maps? Or am I totally misunderstanding things? Edited July 6 by Mateos Precision on debugtriggers output on my end Quote Link to comment Share on other sites More sharing options...
Moderators palota Posted July 6 Moderators Share Posted July 6 Here's my solution: voilegarde_b3.gm Mateos 1 Quote Link to comment Share on other sites More sharing options...
Mateos Posted July 7 Author Share Posted July 7 Oh god the == instead of = on the var init >.> So it was initialized with a boolean and not a string as thought/expected... Hope to have a copy of your eyes someday I prefer your solution as the sleep is now in the door moving table rather than the button pressing one, looks more logic! Thank you very much for the investigation and related commits to the repo! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.