Notice: fwrite(): Write of 59 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Scripting Tutorial #1: An Introduction to Ruby and RGSS
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Scripting Tutorial #1: An Introduction to Ruby and RGSS

Started by Falcon, March 10, 2007, 12:10:51 AM

0 Members and 2 Guests are viewing this topic.

Falcon

You all can go fuck yourselves, I'm not going to put up with this crap of stealing people's work.

keyblade_bearer

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.

Falcon


keyblade_bearer

Lol, how'd you know?

I see, ok then. Understood.

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

AiR

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."

:)

VERY nice start Dark! I understood everything.  ;)
Rep +
Watch out for: HaloOfTheSun

modern algebra

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!

Zeriab

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

Falcon


Zeriab

Np mate.
I will let ya know if I discover anything else. Also just ask if you need any help.

Winged

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



Falcon

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).

Blizzard

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!

Falcon

Just wanted to say I've started the next tutorial (Window Creation/Editing) and it should be finished by Sunday, if not earlier.

Snailer


Arwym

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,

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! ^^

Tsunokiette

Quote from: Zeriab on March 10, 2007, 03:47:15 PM
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."

Falcon

Quote from: Arwym on March 19, 2007, 08:49:18 PM
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)

Arwym

I see! Now I get it much better. ^^

Thank you very much! It is really appreciated.

Zeriab

To compliment what Tsu said, some functionality with booleans:
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.

Falcon


Jalkson


Kokowam

Wow, didn't notice that I didn't post here. GOOD TUT! This is a good tutorial. Are you going to be making more?

Winged

Quote from: Falcon on March 11, 2007, 01:53:25 AM
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



Amoria

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)