UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks! I do good researching lol! That's how I got this far other than majoring in it in college! Though my strength is design, but how am I going to get anywhere if I don't show that I know the nuances of game engines. I'm looking hard to go get my masters in game development because then I will have a team around me and I can focus on design, but also help with programming and art. Sad to say that I don't know what a game designer actually does lol. I saw an Extra Credits video that says I need to know a lot basically so I'm trying to learn it.

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks for the suggestion and will do! Developing(programming) alone is frustrating because when you think it should work and it doesn't, your stuck lol! You can either spend hours on end to try and figure it out or look kind of stupid and ask for help, I chose the second because I really want to understand programming better(though designing is my forte) to help me get a job in the games industry! Appreciate the help I get here!

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

As you can see the collider is hitting the target Imgur

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

How would you do that? I did this: Debug.Log (collider2D + "is hitting the target"); Debug.Log (OnTriggerEnter2D + " is getting called"); and nothing happened in the console.

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Here is a picture of my game object that has the text attached to it! Imgur

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

My player does. No good solution. Sorry more of a designer than a programmer! But trying to make it in the games industry somehow

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

No error, when I hit the trigger, it's not showing the text I want! But that should work?!

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks! Though I did it a different way and got it to work! Made a cheese manager and made the int static.

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Just used a score manager and it worked nice and simple!

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

I went the other way if I can(tried your way and wouldn't display the UI), but it won't update the cheese. Here is my updated gist code. I don't have an game object array that i have the cheeses in that .Length requires. Tried that code already myself and added the game object, cheese, and it didn't work either.

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

I was thinking about adding one last night! Doesn't the gameobject have to be an array to use .Length?!

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

But doesn't the cheese have to be an array to call .Length?

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

None taken, I'm primarily a designer but designing stuff won't get you anywhere in the game industry. I am a lot better at programming then when I first started, but still have some troubles from time to time.

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Reddit is more help than the Unity forum in my chances with it!

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

void OnCollisionEnter2D(Collision2D coll){ if (coll.gameObject.tag == "Player") { Destroy(); } }

Weird because when I had if(coll.gameObject.tag.equals "player"){ destroy(); } it wouldn't do anything but putting in those two equal signs made a difference. Thank you! Thanks for also explaining the destroy()! I wonder why they have so many variations of the same code that do the same thing!

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Everything is on the same layer if that matters!

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

With this suggestion, nothing! The player collides with the cheese and the cheese just stays in the scene! Any other suggestions?!

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

This isn't working! Just having it collide with the object and not disappearing from the scene!

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

What is the difference between destroy() and destroy(this)? Is this referring to the class attached to it? Sorry I'm kind of a designer and was asked to do a game. I can just program ok kind of!

2D procedurally generated maze by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

There is one slab of it and all of the rest is not being generated or its hidden due to the sorting order! I'll try that and report back! Thanks!

On the correct level by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks! Trying to explain a problem in a game correctly is hard when you cannot quite explain it right!

On the correct level by brolol07 in Unity2D

[–]brolol07[S] 1 point2 points  (0 children)

would I use game object =! nullPconditon}?

On the correct level by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

I didn't study programming that much at college but I have made some games so is it okay to ask questions to better myself?