Hey folks! I had great success looking for help here, the last time I needed it for this same project, so I hope someone can help me out again. A little bit of background info - I am still very new to coding and Construct 3 so I will do my best to explain everything properly. The project I am working on is a commission and I don't have permission from the commissioner to share the project or screenshots(there is a very long, insane story of how I came to be working on this project to begin with), but I will provide pseudo code and sneaky snips if possible xD
Ookay, the issue revolves around the main directional/movement controls for the game - the game is a vertical scroller/runner, and the "project manager" wants the main character (which is a spriter object and a pinned sprite object that follows the player for extra collision detection options) to follow the mouse... but not exactly. Since it's a runner, he wants there to be a bit of a delay in the movement for the character to follow - not stuck to the mouse - I have it set up as a bullet with a speed of 100. In my event sheet I have the following events;
System> Compare: distance(character.x,character.y,mouse.x,mouse.y) > 40 [AND] Character> booleanIsRunning (I have other booleans for wipeouts and gameOver) ... Character> Set bullet speed 100, Set bullet angle to angle(character.x/.y,mouse.x/.y)
my next event was INTENDED to have the player stop setting it's angle towards the mouse and stay put there until the mouse is outside of 40 pixels again, but instead he is hovering around the mouse, bouncing back and forth within the 40 pixels
System> Compare: distance(character.x/.y,mouse.x/.y) <= 40 [OR] Character> XbooleanIsRunning(X=inverted) ... Character> set bullet disabled
I'm sure those of you who understand the bullet behaviour more can see my mistake straight away... I was considering that the bullet behaviour might not be the best method to achieve what I want here. I have an "AI" character in the game that fights the main character and I am having a similar issue with him - he is a bullet as well and when he "wipes out" the bullet still keeps him moving around on the screen. So we may be able to kill two cyberbirds with one bugfix ;)
Thank you, brave soul who attempts to help me, in advance and let me know if there's any extra info I can provide to make it easier/clearer!