C
C#5mo ago
Butterhand

✅ Simple Semester Project

Rn im learning C# on Unity and i have a little project. in my game my character should throw a shuriken against a shield to deactivate it for 1s. Then i should be able to dash into the enemy while the deactivation is active. I tried using a bool which is located on the enemy, and gets false when the shuriken hits him and then the maincharacter can destroy him after dashing into him
No description
26 Replies
Butterhand
ButterhandOP5mo ago
No description
qqdev
qqdev5mo ago
What's the question here?
Butterhand
ButterhandOP5mo ago
why isnt the connection working
qqdev
qqdev5mo ago
No description
qqdev
qqdev5mo ago
Interesting choice of words btw :pepecoffee: What do you mean by "connection"?
Butterhand
ButterhandOP5mo ago
throw Shuriken = IsShieldActive false dash while IsShieldActive ( in other Script) destroy Gameobject
SG97
SG975mo ago
Have you fixed the errors?
Butterhand
ButterhandOP5mo ago
idk how like should it even work that way
SG97
SG975mo ago
So instead of saying "something is not working" You post the errors
Butterhand
ButterhandOP5mo ago
sorry :( ive started c# like a week ago
SG97
SG975mo ago
After that, it's easier for someone to help you
qqdev
qqdev5mo ago
There are two parts to this: 1. Make sure you got valid C# 2. Make sure your game logic is correct We can definitely help with 1. and maybe also with 2.
SG97
SG975mo ago
Tbh you should not start with Unity But that's too late now
Butterhand
ButterhandOP5mo ago
so what can i do that i can make it easier for u to help me
SG97
SG975mo ago
In general, you post the code containing errors and the actual error messages In VS, the Error List (I think)
qqdev
qqdev5mo ago
What SG said :blobthumbsup:
Butterhand
ButterhandOP5mo ago
No description
Butterhand
ButterhandOP5mo ago
its german but it says unvalid token
qqdev
qqdev5mo ago
Can you fix those issues or do you need help?
Butterhand
ButterhandOP5mo ago
need help
qqdev
qqdev5mo ago
Okay
qqdev
qqdev5mo ago
No description
qqdev
qqdev5mo ago
So this is invalid because: - Shield is not a static class and you can't access a member of a non-static class like that - For the record: Shield shouldn't be a static class so that part is fine
Butterhand
ButterhandOP5mo ago
Shield is a Script i gave the enemy
qqdev
qqdev5mo ago
That sounds correct I think that's idiomatic when it comes to Unity Can you get rid of the underlined code which I posted a picture of? Just delete it because it's invalid C# And rather use ShieldScript The question is how ShieldScript gets its value. I am not familiar with Unity You could try to get help here: $unity
Want results from more Discord servers?
Add your server