#Coroutine random number issue
1 messages · Page 1 of 1 (latest)
thread
what I expect to be happening is my object gets disabled after the coroutine and the if statements are happening everyframe
@lusty bison you probably forgot about the part of my earlier suggestion of actually checking whether the coroutine is running before starting it.
just adding the bools into the coroutine isn't enough.
I kinda did forget
you should also learn to type your full thought before pressing enter. it's incredibly obnoxious needing to wait 5 minutes between half thought out messages
"awkward silence" and yet you've provided no other actionable information so i don't know what you are expecting.
I was expecting a response
I say akward silence
after I say it I wait for a response
jesus christ, do you want help or not?
Boxfriend chill out. If you need a break I can try and help them.
YES BUT VERTX JUST JUMPED IN AND WAS LIKE "create a thread and stop spamming" OR "don't just type so'
alright, you've made it clear you do not in fact want help you just want to spam so i'm done 👋
You chill out to. We’re trying to solve a simple issue, not create drama
ik
but these people won't be quiet
sorry if I'm being rude
I have minor anger issues
It’s ok
my coroutine ends but then my randomNumber variable just generates a bunch of random numbers
Can you show an example of this
Maybe a video. Also, provide a link to your code
alright
Just letting you know, the reason people were getting mad at you is because it was an issue that was taking forever to solve and they wanted to create a thread to avoid cluttering the page.
did you add the if (!myBool) StartCoroutine(...) check?
no
then the bool doesn't do anything
why are you avoiding the solution?
add the check so your coroutine doesn't start if it's already running
you're continually starting overlapping coroutines, so when you stop starting new coroutines because the clause is met, the rest of the ones you started continue to finish
What you need to do is make it run once, then wait until it has stopped running before running again
make it run once in start?
Using the Boolean that you made, made it set to true at the beginning of the coroutine and false at the end
what's that?
the second or third time i told you to check whether the bool you set in the coroutine is true before starting the coroutine. the entire point of that bool you created earlier
Let me know once you’ve done this
you have to actually check whether the bool is true or not before you start the coroutine
Do this by putting an if statement around your StartCorountine that has a condition of your bool being equal to false
yes
Please provide a link to your code
their StartCoroutine is inside an if-statement, according to the blurry video
Wait what?
okay
why not just share code already?
Oh, sorry I couldn’t see code
yeah I should have done that
It’s ok, just give us the link
Ok, yes put the if statement inside the other one
Your welcome