RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Scripting Tutorial #1: An Introduction to Ruby and RGSS

0 Members and 1 Guest are viewing this topic.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
You all can go fuck yourselves, I'm not going to put up with this crap of stealing people's work.
« Last Edit: August 19, 2007, 07:33:42 PM by Falcon »

***
Rep:
Level 88
Now do you know who I am??
Snineyful, there are a few terms you left out, (false, true, alias) but that's why you'll cover then next, right?

Also, I think making us do ssomething after a lessen would help too. Like moving your menu around. etc.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Obviously someone skipped the authors notes.

***
Rep:
Level 88
Now do you know who I am??
Lol, how'd you know?

I see, ok then. Understood.

I never said it was great did I, lol. So, yeah, I like it.

pokeball AiROffline
**
Rep:
Level 87
It looks wonderful and is very easy for laymen, such as myself, to understand.
"The Optimist believes that we live in the best possible world. The Pesimist fears this to be true."

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
VERY nice start Dark! I understood everything.  ;)
Rep +
Watch out for: HaloOfTheSun

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2010 Best Use Of Avatar And Signature Space2010 Favourite Staff Member
The format is very nice. It is very easy to understand and teaches some of the basic ideas in a very approachable manner. Good job!

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Good work Darklord!
I like the style of your tutorial.

There is something wrong with your operators for conditional statements:
Quote
== Equal
!= Not Equal
<= Less than
>= Greater than

It should be:
Quote
== Equal
!= Not Equal
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to

Good job again

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Thanks a lot for the correction Zeriab :)

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Np mate.
I will let ya know if I discover anything else. Also just ask if you need any help.

*****
<3
Rep:
Level 90
This is great, but what the hell is "def" used for? I'm being such a retard, am I not?

Great job, its really simple and easy to understand compared with some other tuts out there.

~Winged



******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
def tells that a method is beeing defined.

Example:

def display

Defines a method called display, to call that method, simply use "display" (no quotes).

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
Rep++, good work. ;) I get the itches to work on my scripting tute again. ;8
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Just wanted to say I've started the next tutorial (Window Creation/Editing) and it should be finished by Sunday, if not earlier.

*****
Ancient Mummy
Rep:
Level 90
OMG FUCK U PWN IMA READ THIS THANKS

*
A blessing
Rep:
Level 91
<3 Back.
For those familiar with PHP programming, "def" is the same as "function". You define a function (method) you yourself have created.
If this is like PHP, you shouldn't need the "def" after you have defined the method. To use the method again, just type method(), assuming that "method" is the name you defined for it.
For example,

Code: [Select]
def stats(a, b)
Script here
end

I want to use stats() again in another part of the script. So I will just type:

stats(a, b) within the script, right? Please correct me if I am wrong. This is the first time I read RGSS.

If I am wrong, then I assume that "def" has a broader use. If so, please let me know. ^^;



:D I guess this is easier to understand when you're familiar with other languages... <3 I am happy. Thanks for the tut! ^^
« Last Edit: March 19, 2007, 08:59:42 PM by Arwym »

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Good work Darklord!
I like the style of your tutorial.

There is something wrong with your operators for conditional statements:
Quote
== Equal
!= Not Equal
<= Less than
>= Greater than

It should be:
Quote
== Equal
!= Not Equal
< Less than
> Greater than
<= Less than or equal to
>= Greater than or equal to

Good job again

Also, I'd like to note that if you place a "!" in front of anything, it returns the opposite of the value.

"!" in RUBY means "not".
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Code: [Select]
def stats(a, b)
Script here
end

I want to use stats() again in another part of the script. So I will just type:

stats(a, b) within the script, right? Please correct me if I am wrong. This is the first time I read RGSS.

Correct, although a and b would be variables which would be plugged in to the method.

Also, note that the method would only use "stats(avalue, bvalue)" in the class, in another class you would need to use something like $classname.stats(avalue, bvalue)

*
A blessing
Rep:
Level 91
<3 Back.
I see! Now I get it much better. ^^

Thank you very much! It is really appreciated.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
To compliment what Tsu said, some functionality with booleans:
Code: [Select]
p true && true, true && false, false && true, false && false
p true & true, true & false, false & true, false & false
p true || true, true || false, false || true, false || false
p true | true, true | false, false | true, false | false
p true ^ true, true ^ false, false ^ true, false ^ false
p !true, !false

Then there is the whole deal with including the Comparable module.
I can understand if you don't want to put too much of this into the first tutorial.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009

****
If Ham didn't taste like Ham, I would hope it tasted like turkey
Rep:
Level 88
>:O

*
A Random Custom Title
Rep:
Level 96
wah
Wow, didn't notice that I didn't post here. GOOD TUT! This is a good tutorial. Are you going to be making more?

*****
<3
Rep:
Level 90
def tells that a method is beeing defined.

Example:

def display

Defines a method called display, to call that method, simply use "display" (no quotes).

Alrighty, thankyou for clearing that up (it took me sometime to thankyou ><") however I have given up. I lack in memory and commitment, I'd be better of story writing  :-\

~Winged



**
Rep: +0/-0Level 86
Warning: this topic has not been posted in for at least 60 days

sorry ?m new but ? read now :D

This code s are similiar to me because these codes are Visual Basics code for exmpl.  Print "Hello" or msgbox [messagebox] this program [rpgmakerxp] is do with V?sual basic not C++ or Delphi [ ? love Basic :D its easy :D ]


Now Listenin'
Led Zeppelin - Stairway to Heaven ( and listen 4Ever)