C
C#6mo 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
ButterhandOP6mo ago
No description
qqdev
qqdev6mo ago
What's the question here?
Butterhand
ButterhandOP6mo ago
why isnt the connection working
qqdev
qqdev6mo ago
No description
qqdev
qqdev6mo ago
Interesting choice of words btw :pepecoffee: What do you mean by "connection"?
Butterhand
ButterhandOP6mo ago
throw Shuriken = IsShieldActive false dash while IsShieldActive ( in other Script) destroy Gameobject
SG97
SG976mo ago
Have you fixed the errors?
Butterhand
ButterhandOP6mo ago
idk how like should it even work that way
SG97
SG976mo ago
So instead of saying "something is not working" You post the errors
Butterhand
ButterhandOP6mo ago
sorry :( ive started c# like a week ago
SG97
SG976mo ago
After that, it's easier for someone to help you
qqdev
qqdev6mo 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
SG976mo ago
Tbh you should not start with Unity But that's too late now
Butterhand
ButterhandOP6mo ago
so what can i do that i can make it easier for u to help me
SG97
SG976mo ago
In general, you post the code containing errors and the actual error messages In VS, the Error List (I think)
qqdev
qqdev6mo ago
What SG said :blobthumbsup:
Butterhand
ButterhandOP6mo ago
No description
Butterhand
ButterhandOP6mo ago
its german but it says unvalid token
qqdev
qqdev6mo ago
Can you fix those issues or do you need help?
Butterhand
ButterhandOP6mo ago
need help
qqdev
qqdev6mo ago
Okay
qqdev
qqdev6mo ago
No description
qqdev
qqdev6mo 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
ButterhandOP6mo ago
Shield is a Script i gave the enemy
qqdev
qqdev6mo 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