Quantcast
Channel: Questions in topic: "count"
Browsing all 187 articles
Browse latest View live
↧

Number of GameObjects and actions

I need to count the number of GameObjects with the tag "sphere" in the scene and, if they're equal or more than 3 (for example) a gameobject will be destroyed. Can you help me?

View Article


Overlapsphere : Count objects based on variable ?

Hi guys ! So here's what I am trying to do. I have a cube having a certain amount of a resource (water for example). I want this cube to detect other cubes around it and check if they have a lower...

View Article


When EnemyCount reaches 0, Load Win Screen

Ok so I'm running on some major BULLSHIT. I'm trying to make that when you kill all enemies, the Win screen loads. I have 10 enemies in the level, but for some unexplainable reason, that number just...

View Article

count the number on enemyes entrering into a trigger

Im having some confusion here, i have a trigger collider and i want if x number of enemies past trought this collider restart the game, and i try this but nothing hapen #pragma strict var numEnemies :...

View Article

Why won't the count decrease?

This is my code: var rotSpeed: float = 90; // degrees per second var coins : int; function Awake()//initializes coins when game starts or restarts? { coins = 6; } function Update()//every frame, rotate...

View Article


How to Format Timer Counting Up from Zero?

Hey everybody. I have a timer that starts at zero and counts up during game play. As it gains value, I want to display the time in minutes and in seconds and if the timer gets high enough, hours too....

View Article

C# Data Table count rows.

Hello. I am using SimpleSql for my game. However, I have a menu - I need to know how many rows will be returned. Rect rScrollFrame = new Rect(listMargin.x, listMargin.y, listSize.x, listSize.y); Rect...

View Article

How to use FindGameObjectWithTag to get 0

I've been trying to use a simple script to count the number of GameObjects to print to a GUI. I can't figure out how to properly do it. My difficulty is that Length always returns 1. How should I...

View Article


counting how many times a specific animation plays

Hello u unity users. How would you count how many times a specific animation plays from a random range of animations? In this case I want "swing" to play 5 Times, // then do something....

View Article


Apply changes to a random child from sublist

Hi, ALL!!! I have a script that generates 8 objects (prefabs) and place them in 8 (of 12) random slots in the scene, in the way that the objects become the children of the slots. Further I need to...

View Article

[Unity2D Android] Multitouch won't work

The problem here is that when I press/touch booth only the first thing i touched works. Example is if I touch the MOVE sprite first then the Gravity Changer sprite, both will not work only the Move...

View Article

How to increment the number by 1's to get distance traveled?

I have a DistanceKeeper that moves to the left, it is a child of a static object. Currently I am calculating the distance between DistanceKeeper and it's parent in order to get the distance using this...

View Article

How to count child gameobjects with tag

Hi, I am trying to create a function that spawns enemies. However, I want the script to count the number of children with the tag "enemy" and only spawn if that number of children is less than the...

View Article


Count >= then object tag becomes active

"Pickup" the Diamonds. After 7 Diamonds have reached. Objective: The portal opens and the WinPad trigger is active. This code runs but whenever I go over the Winpad its still active. I dont want it to...

View Article

How to script and display score

Hi everybody, I'm learning scripting and in my game I need a specific script. I'm making a game that mashup 3D and 2D scenes. Ok so, I need a script doing this : When the player enter a object collider...

View Article


Counting Facebook Players

Hello Everybody! I need some help with Facebook settings in my App and I'm a bit lost in this new World. I need a code where the player could know how many of its friends have played the (my) game,...

View Article

Does Update() count matter?

As I understand, Update() Gets picked up by reflection on initialization. Would it matter to have one big update, from which everything in game gets updated, or have 100-1000 separate Update() in...

View Article


Vertex count for a entire game level/map

Heya! I couldn't find a answer to this question so I'll just ask it here. Does somebody happen to know how many verticies are, for instance, in one BF4 map? And how many verticies are too much? Right...

View Article

Count trough strings

Hey! I'm looking for a way to count trough my strings. AddItem(System.Convert.ToInt32(ILUS.Novalis_1_0)); AddItem(System.Convert.ToInt32(ILUS.Novalis_1_1));...

View Article

Counting active objects in a list

Utilizing the idea of object pooling, and storing said objects in a list. As seen in here: [Object Pooling][1] I would like to run a check on that list to see if there are any objects active. I know...

View Article
Browsing all 187 articles
Browse latest View live