Quantcast
Channel: Answers by "awest"
Browsing index pages (84 articles)
↧

Answer by awest

You can store initial values for the player. And use them to 'reset' the object when the time comes. You can subtract health using [OnCollisionEnter][1] or [OnTriggerEnter][2] if you don't already have...

View Article


Answer by awest

You are starting your Coroutine every frame that your lives are 0 and respawn is true, but you don't set respawn to false for after 4 seconds. The method starts every frame for those 4 seconds. It...

View Article


Answer by awest

Typically a checkpoint does reset the puzzles and monsters prior to that point. It uses an object with [Don'tDestroyOnLoad][1] to save a couple variables like position, point, lives, etc. That would...

View Article

Answer by awest

You could use one [raycast][1] from the enemy pointed down and forwards a short distance. If it doesn't return something tagged as ground, turn around. I have also used empty [box colliders][2] set as...

View Article

Answer by awest

You should use exit time. In the animator is a default variable when setting up transitions. in the transition just leave it as exit time = 0.9 (90% finished) and add any other if statements onto that....

View Article


Answer by awest

Unity does compiles everything for you. In the file menu is an option "Build Settings" from there you can select the operating system and scenes. Click build and it will make the exe file and data...

View Article

Answer by awest

To create an empty GameObject you can use GameObject parentObject = new GameObject(); //create an 'empty' object object.name = "BlockRow"; //set it's name To Parent objects just use their transform...

View Article

Answer by awest

I start tackling that problem by taking vector points every so often from when the touch starts to when the touch ends. You could use [Camera.ScreenPointToRay][1] and [LineRenderer][2]. Those can give...

View Article


Answer by awest

Instantiating objects with tags/textures is just a matter of creating prefabs. You could even have each object hold a reference to it's mini version, but that isn't the best way to make a radar. I...

View Article


Answer by awest

Sorry for reviving the old post, but I found this while searching for this exact solution. Eventually I found this tutorial and it answered all my questions....

View Article

Answer by awest

In the line Quaternion.Lerp(qStart,qEnd,(MathF.Sin(Time.time*speed)+1.0f)/2.0f) qStart and qEnd are your beginning and end angles. The rest is how it calculates where it is between them. You should be...

View Article

Answer by awest

Thanks @NoseKills @KayelGee. I had to go to work. Glad you were able to see it through. The problem was this line because it added a clamped value to an unrestricted variable....

View Article

Answer by awest

Making indie water translucent is just changing one line of code in the shader. (I can't recall which one, but you can probably search the googs to find it.) Fog can be accessed and changed through...

View Article


Answer by awest

The problem is that the GUIText variable will only accept GUIText. You need to change the variable type definition to be that of the text. That's just Text instead of GUIText. public Text scoreText;...

View Article

Answer by awest

I think the problem you're running into is that the Regeneration function is being called each frame for 10 seconds before health reaches over 100. You can use the return command to exit a function (to...

View Article


Answer by awest

The Url syntax would look like this www.website/script.php?formfield1=value1&formfield2=value2 The "?" starts the string and variables are separated with "&"

View Article

Answer by awest

I see a couple issues. You are calling GameObject.Find every single frame (this is very slow and will cause lag in larger projects) and I don't see where you set attach_weapon to true or false. I would...

View Article


Answer by awest

The short answer is yes. It's called [Polymorphism][1]. You can make a generic list in the base class and assign objects that inherit that base class within the list. [1]:...

View Article

Answer by awest

I don't believe editor scripts can be attached to an object. They just go in a folder named Editor to be read as such.

View Article

Answer by awest

I would try checking if the players velocity.y > 0. then make it's collider a trigger. In C#, it could be one line in the players update. although you might only want to check when the player is not...

View Article
Browsing index pages (84 articles)


Latest Images