Fix some Code in Unity
Budget: $10 – $30 AUD
I have a game project that is in progress.
I had someone code in behaviour for my ghost - but it is not working, so I need someone who knows what they are doing to fix it.
The ghost is meant to be in an indle state, and then on triggering a 'chase' is meant to chase the player.
IF the ghost loses line of sight of the player, either by the player gaining distance, getting away from the front view of the ghost, or getting behind an obstacle, then the ghost should attempt to move to the last place it had line of sight.
If it cannot get to the last location, or once it does, it should then enter the wandering state for 20 seconds, looking around for the player.
If after 20 seconds the player is not found, the ghost should return idle. There should also be the option for it to teleport back to its origional position ( I will handle the call for this based on my game.)
What is currently happening: The ghost is starting in chase mode, regardless of how far away the player is.
Once line of sight is broken, the ghost continues to stay in chase mode, infinitely.
What I need fixed:
- The ghost should not start in chase mode
- The ghost should not stay in chase mode after losing line of sight.
- The ghost should not infinitley keep 'trying' to get to last location (in case of bug or glitch, it should be timed) but get close as it can and then after a time, drop into wandering.
- The ghost should enter wandering state once conditions are met.
- The ghost should then exit wandering after 20 seconds.
All of the code essentially is written for the behaviour - it is just not changing states when it should.
Absolute requirements for this project:
- You must fix the script and only edit the existing script, not adding further scripts, and test the project to ensure it is doing as it is meant to.
- You will need to provide the adjusted script(s) as well as just the build (so I can test)
- Depending on how much adjustment there is (such as if various fields are added that require drag and dropped inputs) the whole project may need to be sent across, but I am attempting to just have the script fixed to have it working, without the need to have the whole project sent.
- You will need to provide what changed, and how the switch to teleporting to last location can be called.
- You need to code in the version of unity provided and not change the unity version.
- You will need to download the full project from the google drive link - it is around 2gig in size.
I had someone code in behaviour for my ghost - but it is not working, so I need someone who knows what they are doing to fix it.
The ghost is meant to be in an indle state, and then on triggering a 'chase' is meant to chase the player.
IF the ghost loses line of sight of the player, either by the player gaining distance, getting away from the front view of the ghost, or getting behind an obstacle, then the ghost should attempt to move to the last place it had line of sight.
If it cannot get to the last location, or once it does, it should then enter the wandering state for 20 seconds, looking around for the player.
If after 20 seconds the player is not found, the ghost should return idle. There should also be the option for it to teleport back to its origional position ( I will handle the call for this based on my game.)
What is currently happening: The ghost is starting in chase mode, regardless of how far away the player is.
Once line of sight is broken, the ghost continues to stay in chase mode, infinitely.
What I need fixed:
- The ghost should not start in chase mode
- The ghost should not stay in chase mode after losing line of sight.
- The ghost should not infinitley keep 'trying' to get to last location (in case of bug or glitch, it should be timed) but get close as it can and then after a time, drop into wandering.
- The ghost should enter wandering state once conditions are met.
- The ghost should then exit wandering after 20 seconds.
All of the code essentially is written for the behaviour - it is just not changing states when it should.
Absolute requirements for this project:
- You must fix the script and only edit the existing script, not adding further scripts, and test the project to ensure it is doing as it is meant to.
- You will need to provide the adjusted script(s) as well as just the build (so I can test)
- Depending on how much adjustment there is (such as if various fields are added that require drag and dropped inputs) the whole project may need to be sent across, but I am attempting to just have the script fixed to have it working, without the need to have the whole project sent.
- You will need to provide what changed, and how the switch to teleporting to last location can be called.
- You need to code in the version of unity provided and not change the unity version.
- You will need to download the full project from the google drive link - it is around 2gig in size.