One Million Worlds Wiki
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
One Million Worlds Wiki
78
pages
Explore
Main Page
All Pages
Interactive Maps
navigation
Main page
Community portal
Recent changes
Random page
Admin noticeboard
Gamepedia
Gamepedia support
Report a bad ad
Help Wiki
Contact us
Editing
Script Block
(section)
Back to page
Edit
VisualEditor
History
Talk (0)
Edit Page
Script Block
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Loops == You don’t need loops, please skip this section. Ok fine, loops are useful when you want to do something more than once. A simple loop could be like this: <pre>for(i = 0; i<5; i++){ /*this area will be executed 5 times, once with i as 0, then 1 etc until finally when i is 4*/ }</pre> Lets say, in the “go away” example the closer they get the more you want to say go away, lets say one exclamation mark for every meter they get towards you. A loop can do that. <pre>distanceAway = W permittedDistance = 10 if(distanceAway < permittedDistance){ message = "Go Away" exclamationMarksToShow = permittedDistance - distanceAway //closer they get the more exclamation marks for( i = 0; i < exclamationMarksToShow; i++){ message = message + "!" } N = message }</pre>
Summary:
Please note that all contributions to the One Million Worlds Wiki are considered to be released under the CC BY-NC-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab