C
C#15mo ago
ZULFEN

Good afternoon, could anyone help me with some C# code?

I'm trying to make a shooting system, like those ship games. But it's not working very well, no shots are moving.
No description
11 Replies
ZULFEN
ZULFENOP15mo ago
🥄feeders help me learn faster !
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
ZULFEN
ZULFENOP15mo ago
like this?
No description
🥄feeders help me learn faster !
Don't forget the assignment operator =.
ZULFEN
ZULFENOP15mo ago
where do I have to add it?
🥄feeders help me learn faster !
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
ZULFEN
ZULFENOP15mo ago
like this?
No description
🥄feeders help me learn faster !
Adjust this value based on your test. I don't use Unity here so I don't know what the appropriate value for it is.
ZULFEN
ZULFENOP15mo ago
I did this, but the script is not being passed to the clones
No description
Buddy
Buddy15mo ago
You need to change and apply the value on prefabs too. Press overrides -> apply Top left in the inspector

Did you find this page helpful?