Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 RGSS scripting dissections and explinations
#62
I think something needs to be added towards kyonides' description of the Game_Actor class, and that there is something missing in his basic example as shown below:
Code:
Class Game_Actor
  attr_reader :age, :height, :weight, :hunger
  def max_age
    100
  end
end
$game_actors[50] = Game_Actor.new(50)
$game_actors[50].name = "Evil Pod Pod"
$game_actors[50].age = 0

Within RPGMaker, there is a Game_Actor class, and a separate class called Game_Actors. Game_Actor is basically the structure or skeleton for each of your heroes, having a placeholder for your hero's name, his or her age, weight, height and ... hunger? But the Game_Actors class is a your list of actors when they've been made. It's like saying the Game_Actor class is a blank form to fill out. Each time you make a hero, you xerox the form, fill in the blanks and shove it into the Game_Actors 3-ring binder. Your original Game_Actor class is just the solid form with all the instructions.

So kyonides made a new actor, taking a copy of the 'Game_Actor' class, and filling in the fields for hero #50 being Pod... er ... Evil Pod Pod. After that, Evil Pod Pod can then be found in the Game_Actors class using $game_actors[50]. And it's not a coincidence that he uses the same number (50) between both the Game_Actor and Game_Actors class. Both numbers are meant to be the same, the ID of your hero from the database. So when Aluxes is introduced, it's much like saying $game_actors[1] = Game_Actor.new(1)
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Messages In This Thread
RE: RGSS scripting dissections and explinations - by DerVVulfman - 01-29-2018, 04:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Help iwth script (RGSS Player crash) Whisper 3 7,675 06-17-2017, 05:03 PM
Last Post: Whisper
  How can I use the cmd of "require" in rgss superegp 2 5,384 11-03-2015, 06:16 AM
Last Post: kyonides
   Scripting in VX vs VX Ace Miharu 5 8,207 02-21-2015, 10:10 AM
Last Post: Taylor
   Combat animations via scripting; How? ZeroSum 2 4,572 09-20-2013, 06:58 PM
Last Post: ZeroSum
Question  RGSS stoped to work Chaos17 5 6,930 02-14-2013, 05:13 PM
Last Post: DerVVulfman
   Ruby, RGSS & General Code Discussion Kain Nobel 6 9,916 12-22-2012, 05:11 AM
Last Post: MechanicalPen
   [Request] Tut. for RGSS Eldur 9 10,612 12-07-2012, 04:27 AM
Last Post: DerVVulfman
   [ASK-RGSS] Behemoth's CBS alike Getsuga_kawaii 0 3,864 04-29-2010, 03:07 PM
Last Post: Getsuga_kawaii
   Scripting I think spazfire 7 8,984 04-12-2010, 03:21 AM
Last Post: DerVVulfman
   Beginner Scripting Tuts? KDawg08 1 3,685 03-31-2010, 11:03 PM
Last Post: Hsia_Nu



Users browsing this thread: