kamilo 7 Share Posted July 9, 2020 hey guys since the walk method automatically opens doors, when you're in pest control, the door becomes damaged and so the bot tries to keep opening it in this case, it can't. and if the door is coempletely gone it will still try that 'open' option is there a way around it? i was thinking filtering any doors that have the action ("repair") on them and not open them can i do that? Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted July 9, 2020 Yes you can. Link to comment Share on other sites More sharing options...
kamilo 7 Author Share Posted July 9, 2020 17 minutes ago, Pseudo said: Yes you can. whats the command for neglecting doors i know about addObstable but i see nothing like IgnoreObstacle or somthing similar Link to comment Share on other sites More sharing options...
AsBakedAsCake 202 Share Posted July 9, 2020 28 minutes ago, kamilo said: whats the command for neglecting doors i know about addObstable but i see nothing like IgnoreObstacle or somthing similar Something like this should work, maybe wrong format because I didn't do this in an IDE: Filter<GameObject> doorFilter = GameObject -> GameObject != null && GameObject.getName().equals("door") && !GameObject.hasOption("repair"); Link to comment Share on other sites More sharing options...
kamilo 7 Author Share Posted July 9, 2020 17 minutes ago, AsBakedAsCake said: Something like this should work, maybe wrong format because I didn't do this in an IDE: Filter<GameObject> doorFilter = GameObject -> GameObject != null && GameObject.getName().equals("door") && !GameObject.hasOption("repair"); thats fine but how do i incorportate it with getWalking() because that method is autmatically opening doors or should i do Filter<GameObject> doorFilter = GameObject -> GameObject != null && GameObject.getName().equals("door") && !GameObject.hasOption("repair"); addObstacle(doorFilter,) etc..? and this will automatically focus on doors without "repair" options ^is that correct? Link to comment Share on other sites More sharing options...
AsBakedAsCake 202 Share Posted July 9, 2020 2 minutes ago, kamilo said: or should i do Filter<GameObject> doorFilter = GameObject -> GameObject != null && GameObject.getName().equals("door") && !GameObject.hasOption("repair"); addObstacle(doorFilter,) etc..? and this will automatically focus on doors without "repair" options ^is that correct? You'll have to do some experimenting, but you may be able to do it that way. You may be able to make a filter for the obstacle rather than the GameObject, this is just something I thought of off the top. Link to comment Share on other sites More sharing options...
kamilo 7 Author Share Posted July 10, 2020 5 hours ago, AsBakedAsCake said: You'll have to do some experimenting, but you may be able to do it that way. You may be able to make a filter for the obstacle rather than the GameObject, this is just something I thought of off the top. okay but is there a way to disable opening doors from the getWalking() method??? Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted July 10, 2020 Just simply check if a door with the repair option is nearby and if so recalculate path? Link to comment Share on other sites More sharing options...
kamilo 7 Author Share Posted July 10, 2020 5 hours ago, Pseudo said: Just simply check if a door with the repair option is nearby and if so recalculate path? okay ill add a boolean check in my walkTo() method; but how would i go about doing this recalculated method Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.