Invoke repeating wont repeat
Hi invoke repeating doesnt repeat it just invoke once but doesnt repeate every second. A little help would be appreciated. Thanks! Transform Player; float RotSpeed = 90f; Vector2 dire;//direction of...
View ArticleInvokeRepeating help
Hey everyone, i have a problem with InvokeRepeating and variables. I have a float called hunger, and im using an InvokeRepeating to make sure the hunger float decreases every x seconds. This works...
View ArticlePassing Lists as parameters in functions
Hello everyone. I am having trouble with the following problem. I know that this is rather specific but since i am learning c# and unity all by myself i don't know who or where else to ask. Thanks in...
View Articleam i doing invoke repeating wrong?
im using unity 5.6.0 for this btw. i have 2 problems with invoke repeating, first of all it wont stop creating objects after i let go of spacebar, second no matter what i change the firing rate to it...
View ArticleCoroutines or InvokeRepeating
Which one of these would you recommend if you would have something happen every second: 1. Start a coroutine in Start() and use while(true){ yield return new WaitForSeconds(1f); } in the coroutine 2....
View ArticleInvokeRepeating does not call method
I have an abstract class wich calls a wrapper function to call another functon with as parameter an abstract function from lower classes. The class itself is Enemy and is abstract, Its subclasses are...
View ArticleSpawned Enemies: How to Destroy child objects inside their own attached...
I'm creating a (early version) tower defense shooter game with spawned enemies. I have GameObject called *SpawnLocation* that contains the location in which I would like to spawn my enemies, with a...
View ArticleDisplaying C# Int Value to GUI
Hey all, I'm starting a new project and I'm trying to create a date function where every seconds adds another day. So far, my code is: using UnityEngine; using System.Collections; using UnityEngine.UI;...
View ArticleInvokeRepeating() not working.
I am trying to fire bullets at a rate determined by the weaponFireRate variable, but no matter what I do it will always fire one bullet per seconds. Here is the code: public int health; public int...
View ArticleDecreasing a value over time, called by InvokeRepeating
I'm attempting to create an effect in my game in which two discreet spot lights lower and raise their intensity every so often to give the impression that the player is actually travelling through...
View ArticleWhy 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 Article