Game
Sonic.Exe: Spirits of Nightmare
4 years ago

(Bonus!)

Time to tell what I've learned during the Lua learning.

Note: This is long and easy to learn. I like showing tutorials! If you want more, I will do it!


math.random(), a script that randomizes things.

math.random() that is blank, generates a number between 0 and 1. For an example:

math.random() Expected Output: -- the console is the output.

0.986203 -- this is our answer. Listen closely. this next part is going to be a little harder to understand. So read multiple times to understand!

a math.random() with numbers in it such as math.random(1,8) generates a number between 1 and 8

math.random(1,8)

print(number) Expected Output:

3

Let's try making a script out of this.

local numbers = math.random(1,3) -- a local must always be behind the value you want to. Unlike Python, you can just use numbers = instead.

if numbers == 1 then -- must be double equals or it will break. In Python, then dosen't exist. You instead use : instead of then.

print("Value is 1.") -- prints it to the Output.

else if number == 2 then -- I strongly prefer else if instead of elseif. The elseif dosen't generate an end. It just is a definition that if something else happens, it does that.

print("Value is 2.")

else if numbers == 3 then

print("Value is 3.")

end

end

end -- an end must ALWAYS be after if an function like if then, while do, function() and more. The script will BREAK if you don't put an end in it.



0 comments

Loading...

Next up

Hoochie Mama. It's been so long. Almost a month! Alright, you guys deserve a leak from the Knuckles' gliding sprite test! It's not ready yet. I'm pressuring myself so much that it's taken a month to reply. Here's a GIF. (Bad quality.)

The intro used when you get bad ending, when you get this, you know you messed up.

Lil' leak for Knuckles, it's SLIGHTLY better/different than the previous leak. 2/3

Posting more Leaks SOON! Be sure to follow this game for the latest leaks! Here's Another look in the game. Also More Soundtracks to come, Good News is: The game is about 35% Done. Bad News is the game is slowing down in development.

Wait.. 100 views!? Okay hold up...

Here! Alright, here is what you wanted.

Last Zone for Secret Ending ;)

Short intro of us 💕✌️

We're an eletro duo based in Seoul 🇰🇷 Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era 💽 CD listenin 📟 beeper beepin 💾 floppy disks floppin days 😎

Stream now! 🎧

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqU…

This Satuday we invite to watch another #speedpainting of our artist Daniel Faiad.

How great is this scene of #Pecaminosa?

#ScreenShotSaturday | #IndieDev | #DigitalArt

Quantum precognition is one of the most powerful cards. End game cards & equipment. Demo/alpha build boss is no match for this deck.