mr.killmeplease
mr.killmeplease
Explore posts from servers
CC#
Created by mr.killmeplease on 4/10/2024 in #help
Why isnt my player being deleted and the scene changed?
ok thx
14 replies
CC#
Created by mr.killmeplease on 4/10/2024 in #help
Why isnt my player being deleted and the scene changed?
also i tried that codegif but it says theres too many characters for discord to handle
14 replies
CC#
Created by mr.killmeplease on 4/10/2024 in #help
Why isnt my player being deleted and the scene changed?
im not sure what a breakpoint is but i figured out that its something with the reduction of health because the attack successful debug worked. But for some reason instead of killing the player after getting hit 10 times, it just continued running.
14 replies
CC#
Created by mr.killmeplease on 4/10/2024 in #help
Why isnt my player being deleted and the scene changed?
and then the player health script: using UnityEngine; using UnityEngine.SceneManagement; public class PlayerHealth : MonoBehaviour { public int maxHealth = 100; public int currentHealth; void Start() { currentHealth = maxHealth; } }
14 replies
CC#
Created by mr.killmeplease on 4/10/2024 in #help
Why isnt my player being deleted and the scene changed?
{ // Reduce player's health Debug.Log("Attack successful!"); PlayerHealth playerHealth = player.GetComponent<PlayerHealth>(); if (playerHealth != null) { playerHealth.currentHealth -= damage; // Reduce player's health if (playerHealth.currentHealth <= 0) { Destroy(gameObject); SceneManager.LoadScene("Main Menu"); playerHealth.maxHealth = 100; } } } } }
14 replies
CC#
Created by mr.killmeplease on 11/12/2023 in #help
I Dont know what this error means and it isnt an issue the guy in the video im watching is having.
yeah im dumb. alright thanks.
6 replies
CC#
Created by mr.killmeplease on 11/5/2023 in #help
❔ How do I change the color of certain targets when they're shot, and also destroy others when shot?
if (hit.collider.tag == "Color") apparently, but im not sure what about that line wouldnt be referencing an object
13 replies
CC#
Created by mr.killmeplease on 11/5/2023 in #help
❔ How do I change the color of certain targets when they're shot, and also destroy others when shot?
i dont know what that means
13 replies
CC#
Created by mr.killmeplease on 11/5/2023 in #help
❔ How do I change the color of certain targets when they're shot, and also destroy others when shot?
yeah, im getting an error: Object reference not set to an instance of the object
13 replies
CC#
Created by mr.killmeplease on 11/5/2023 in #help
❔ How do I change the color of certain targets when they're shot, and also destroy others when shot?
yeah theyre tagged as Color and Destroy
13 replies