Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

You have to make it so that when the character's distance from the destination is less than 5, the dragging booleans are set to false. I'm not sure if it has something to do with the ps.isBase boolean, as you may want to replace it. This script is kinda long.

Ok well how would you suggest I write it? I'm really bad with colliders. I just tried to rewrite the code but now all he does is run to the base's transform without touching the player and he can't grab the player anymore.

You need to properly check the booleans and ensure components for all objects are set in place. If a boolean is set to false, then the character will wander, however, if the boolean is true, then he will drag the player. Figure the problem out yourself, because I don't really know how to help you from this point on.

Ok, thank you for the help regardless