A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate in the Unity community.
Separate names with a comma.
I am trying to componentize all of my scripts and I would like the enemy to lose 1 health (enemy max health is 3) every time the player collides...
I updated the bottom code block to have the Enemy code. Thanks for catching that! You think with my game at this point, I can wholly build it on...
Currently, when the player jumps on top of an enemy, the player and the enemy take damage. I'm trying to figure out a way that only the enemy...
I'm learning inheritance and composition in C# for the first time and based on the below so far, is there a cleaner/more modular way I could...
This works! Thank you. I will look into using composition. This is a small game so I may stick to this for now and get more acquainted with...
I'm learning about inheritance and created a parent class called Character. Then there's a child class called Player. I was trying to assign the...
Thank you so much, Quinn. This really helped me!
I wrote code for the player to respawn at a set point once they have 0 HP. The player's HP also is set to the max health again. The issue with...
I am embarrassed to say I did indeed have a duplicate script attached to my Player object. That was messy of me. I will also read the do not use...
Thank you so much, both of you. I've saved that very helpful thread. I was able to fix the issue by assigning it in code instead of in the...
I just wrote some code so when the player falls off a platform and collides with a trigger collider called Respawn Trigger, the player's transform...
This is brilliant. Thank you, both. Also thanks to DMGregory on StackOverflow, this code works. I realized the faster flashing over time was...
The code below has the player flashing when touching a hazard but continues flashing indefinitely. If I stand on the spike for a few seconds, the...
Thank you. I made these changes at it worked! I just needed to keep the if statement in the TakeDamage method. I appreciate everyone's help!
Thank you for this. I will give this a try! In the meantime, I also created a counter as a solution: using UnityEngine; public class...
I have a 2D platformer and when the player collides with a tile that is on the Hazard layer, the player takes 1 damage. However, I would like for...
Thank you both!!! @QuinnWinters Because of the nature of my 2D platformer, I was able to just use the flipX boolean on the Sprite Renderer. I...
I'm creating a 2D platformer game and I have a Player gameObject in the hierarchy that has its sprite. When the player is facing one way and they...
I figured out if I wanted the player to move, collide with a hazard, stop moving, respawn and then be able to move again, I needed to write the...
Hey all, I have grid movement set up for the player within a set space. The player moves one unit at a time and can move several units when...