C
C#•5mo ago
Kinda Ducky

SpawnEnemy lore (scope and what not)

yo, please help me fix this 🙂 (it went as .txt sorry)
10 Replies
clxs
clxs•5mo ago
One thing to look at is this line int level = ed.Next(0, 3); Look at the docs for how Random.Next works https://learn.microsoft.com/en-us/dotnet/api/system.random.next?view=net-8.0#system-random-next(system-int32-system-int32) That'll be returning a value between 0 and 2, is that what you'd expected?
Kinda Ducky
Kinda Ducky•5mo ago
Interesting, didn't know it worked like that, i kinda just went through the first time
Kinda Ducky
Kinda Ducky•5mo ago
I think it's right now
No description
clxs
clxs•5mo ago
Not quite, https://learn.microsoft.com/en-us/dotnet/api/system.random.next?view=net-8.0#system-random-next(system-int32) That one also returns a value between 0 and the value you gave it (exclusively, meaning 2)
Kinda Ducky
Kinda Ducky•5mo ago
int level = ed.Next(1, 4) it's gotta be it At least it's kinda working
clxs
clxs•5mo ago
That's right yep
Kinda Ducky
Kinda Ducky•5mo ago
Maybe i have a defective gene, it was pretty obvious answer Think i moved from that part deciding whats on next Hey!
Kinda Ducky
Kinda Ducky•5mo ago
I was trying to make the combat system, but or it doesn't run or in case 1: it justa loops
No description
Kinda Ducky
Kinda Ducky•5mo ago
idk why it's .txt think its too big if you want i can send by parts