Why aren't Coroutines working for me?
Hi, I was originally using InvokeRepeating for my enemies to spawn and it is fine if they spawn at a continuous rate but I want them to spawn faster and faster as the game goes on but since...
View ArticleGetting Updates from website
Im calling Functions on my mindstorms device running a webserver. it listens to numbers im sending e.g. 200 or 900 and drives a certain way. There is also a "motorstatus" url where the current motor...
View ArticlePause between user mouse clicks
I'm trying to make a grid turn based game and I want the user to be able to click on the grid, then have a pause function that does not let them click anywhere for 2 seconds or so then after this...
View Articleinvoke method attack.decreaseTimeRemaining couldn't be called
So the scene picks a random image of four, at which point I want a count down to start that is waiting for user input, if the countdown hits 0 the user dies if the correct input is pressed then they...
View ArticleRaycast ignoring InvokeRepeating intervals
Hi, so i posted a question to the default answers page but it's been under moderation for 2 days now so was advised to post my question here instead. I'm fairly new to Unity and coding so bear with me...
View ArticleRaycast ignoring InvokeRepeating intervals
Hi, so i'm fairly new to Unity and coding and am doing a project for college. Essentially I have 2 separate codes; the first is for the player to shoot when i hold down the "Fire1" key which works...
View ArticleIssue with starting/canceling invokes
Im having an issue with canceling/starting invokes in my update. I have a time "frenzyTimer" which sets a bool in another class in which will state what type of invoke should be running. The start...
View Articlemultiply Score on Collision not working? check my code plz
So what I'm trying to do here is when the player collide By " x2" object the score gets update +2 instead of +1 , I tried a lot of codes and I can't get anything to work, maybe its easy and I miss...
View ArticleCan I increase gravity / fallspeed of instantiated prefabs over time?
Hello! I am working on a 2D color matching / catch game and I am trying to increase the gravity of my instantiated objects so the longer the game goes on, the faster they fall. Here is the code I am...
View ArticleHow to cancel an Invoke from another script,How to Cancel an invoke from...
So basically I'm trying to cancel an InvokeRepeating call from another script using this code: void OnTriggerExit(Collider otherCollider) { if (otherCollider.tag == "Player") { CancelInvoke...
View ArticleCalling CancelInvoke() ?
Hello! I have some prefabs being instantiated and the speed at which they fall increases over time using InvokeRepeating. Calling InvokeRepeating works great but my issue is that I can't get it to...
View ArticleIndexOutOfRangeException: Array index is out of range
IndexOutOfRangeException: Array index is out of range, it's my problem with this script at 37th line (GameObject Newaster = Instantiate (aster[spawnObject], spawnPoints [spawnIndex].position,...
View ArticleInvokeReapting() Repeat rate not updating
When I shoot I use InvokeRepeating to continuously shoot until I let go of space. In game there is a powerup which decreases this repeat rate but I need to stop shooting then star shooting for it to...
View Article[Solved] Is Invoke Repeating Frame Independent??
Hello everybody, im have the same problem since weeks: Getting my player movement frame independent! I cant do it in Fixed Update because it will move Jittering. Im using a Character Controller. So i...
View ArticleHow i can make a function call and then after 15 sec another function call...
I have a 2D game. I am in a problem. My game has three levels. Actually i have to cars. one is white other is yellow. And there are two types of incoming circles white and yellow. and currently my game...
View ArticleSNAKE - How to change InvokeRepeating rate?
Hi this is the start function attached to my snake: void Start() { InvokeRepeating("Move", 0.3f, repeatRate); score = 0; SetScoreText(); textYouLose.text = ""; } i wish to change the repeat rate every...
View ArticleInvokeRepeating VS Coroutines [Performance]
**Hello everyone.** I was wondering, what is better to use InvokeRepeating or Coroutines? I want to optimize my scripts and instead of calling stuff every frame per seconds inside the Update() function...
View ArticleI have no idea why this isn't working
So i have got this script here and it is saving and loading data fine, thats not the problem but the realAnts value is not changing and i have no idea why, as im pretty sure all the things start...
View ArticleInvokeRepeating gets crazy when Time.timeScale is increased
I have a simple 2D game in Unity 2017.2 where the player has to jump obstacles, and to raise difficulty I want to increase the speed of the game, so **i am using a InvokeRepeating method to increase...
View ArticleInvokeRepeating not working in unity with .Net 4.6
I attached the below script to the camera using System.Collections; using System.Collections.Generic; using UnityEngine; public class Sample : MonoBehaviour { int i=0; void Start () { Debug.Log("This...
View Article