Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Karltheking4

41
Creating an entirely new project with just that script, 1 parallel process map event with
self_variable(1, 1, 0)
print self_variable(1)
gives you the same error!!! :'(

The odd thing is though, it works fine if it's an autorun event, but unfortunetly, that's not needed!!!

also, woops! sorry! :^_^':
42
pk8's self variable script (below) is a really awesome script, but I can't figure out what this odd problem is.
It won't work in parallel process map events, if you try to script it, it gives you an error on line 127. about not understand '[]''s

Any ideas???

PLease help!!!

pks self variable script: ShowHide

=begin
═══════════════════════════════════════════════════════════════════════════════╗ ​​
║ PK8's Self Variables ║
║ Version 1.0 ║
║ by PK8 ║
║ 9/16/09 ║
║ http://rmvxp.com ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​​
║ ■ Table of Contents ║
║ ├─ Author's Notes - Line 18─21 ║
║ ├─ Introduction & Description - Line 23─29 ║
║ ├─ Features - Line 31─33 ║
║ ├─ How to Use - Line 35─59 ║
║ ├─ This aliases the following... - Line 61─64 ║
║ ├─ Thanks - Line 66─71 ║
║ └─ Changelog - Line 73,74 ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​
║ ■ Author's Notes ║
║ Lowell/Adalwulf mentioned creating a "Personal Variables" system which filled║
║ my head in with ideas about variables and switches. One of these ideas being ║
║ self variables. ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​​
║ ■ Introduction & Description ║
║ This script is pretty similar to that of the built in feature: Self Switches.║
║ For those not familiar with Self Switches, Self Switches pretty much pertain ║
║ to a specific event. Example: Treasure Chests. ║
║ ║
║ Self Variables allows users to set certain variables pertaining to a specific║
║ event. Examples include: An event's feelings towards you. ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​​
║ ■ Features ║
║ ─ Set self variables of an event via call script. (How to use is below) ║
║ ─ Get self variables of an event via call script. (How to use is below) ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​
║ ■ How to Use ║
║ ║
║ ● Setting up a self variable: ║
║ To set a self variable for an event, you'll need to call this script on a ║
║ map event: ║
║ self_variable(id, value, oper) ║
║ id: Self Variable Identification. Example: 'feeling' ║
║ value: Give it a value. ║
║ oper: 0: Set, 1: Add, 2: Sub, 3: Mul, 4: Div, 5: Mod ║
║ ║
║ ● Getting a self variable: ║
║ To get a self variable for an event, you can call this script. ║
║ self_variable(id) ║
║ id: Self Variable Identification. ║
║ ║
║ ● Using self variables in evented if conditions. ║
║ You're probably wondering how, right? Alright. To do this, go to the ║
║ conditional branch event command, click on the fourth tab, select Script ║
║ and type either of these in the input form: ║
║ self_variable(id) == value <- Equal to. ║
║ self_variable(id) >= value <- Greater than or Equal to. ║
║ self_variable(id) <= value <- Less than or Equal to. ║
║ self_variable(id) > value <- Greater than. ║
║ self_variable(id) < value <- Less than. ║
║ self_variable(id) != value <- Not Equal to. ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​
║ ■ This aliases the following... ║
║ command_new_game - Scene_Title ║
║ write_save_data - Scene_Save < Scene_File ║
║ read_save_data - Scene_Load < Scene_File ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​
║ ■ Thanks ║
║ Lowell: He mentioned creating a personal variables system for his project ║
║ (I think), which made me catch "the scripting bug". ║
║ Decibel: Wanted some way to get self variables into messages but I couldn't ║
║ do it. Someone, help! ║
║ Kain Nobel: He helped me with making this an RMXP script. ║
╟──────────────────────────────────────────────────────────────────────────────╢ ​
║ ■ Changelog ║
║ Version 1.0 - 9/16/09: Initial Release ║
╚══════════════════════════════════════════════════════════════════════════════╝ ​​
=end

#==============================================================================
# ** Game_SelfVariables
#------------------------------------------------------------------------------
# This class handles self variables. It's a wrapper for the built-in class
# "Hash." The instance of this class is referenced by $game_self_variables.
#==============================================================================

class Game_SelfVariables
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@data = {}
end
#--------------------------------------------------------------------------
# * Get Self Switch
# key : key
#--------------------------------------------------------------------------
def [](key)
if @data[key] == nil
return 0
else
return @data[key]
end
end
#--------------------------------------------------------------------------
# * Set Self Switch
# key : key
# value : key's value
#--------------------------------------------------------------------------
def []=(key, value)
@data[key] = value
end
end

#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
# This interpreter runs event commands. This class is used within the
# Game_System class and the Game_Event class.
#==============================================================================

class Interpreter
def self_variable(id, value = nil, oper = nil)
if @event_id > 0
key = [@map_id, @event_id, id]
if value != nil
case oper
when nil, 0, 'equal', 'set', '=' # Setting
$game_self_variables[key] = value
when 1, 'add', '+' # Adding
$game_self_variables[key] += value
when 2, 'sub', 'subtract', '-' # Subtracting
$game_self_variables[key] -= value
when 3, 'mul', 'multiply', 'x', '*' # Multiplying
$game_self_variables[key] *= value
when 4, 'div', 'divide', '/' # Dividing
$game_self_variables[key] /= value if value != 0
when 5, 'mod', 'modular', '%' # Modulating
$game_self_variables[key] %= value if value != 0
end
else
return $game_self_variables[key]
end
if value != nil
$game_map.need_refresh = true
return true
end
end
end
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================

class Scene_Title
alias pk8_self_variables_command_new_game :command_new_game
#--------------------------------------------------------------------------
# * Create Game Objects
#--------------------------------------------------------------------------
def command_new_game
pk8_self_variables_command_new_game
$game_self_variables = Game_SelfVariables.new
end
end

#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
# This class performs save screen processing.
#==============================================================================

class Scene_Save < Scene_File
alias pk8_self_variables_write_save_data :write_save_data
#--------------------------------------------------------------------------
# * Write Save Data
# file : write file object (opened)
#--------------------------------------------------------------------------
def write_save_data(file)
pk8_self_variables_write_save_data(file)
Marshal.dump($game_self_variables, file)
end
end

#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
# This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
alias pk8_self_variables_read_save_data :read_save_data
#--------------------------------------------------------------------------
# * Read Save Data
# file : file object for reading (opened)
#--------------------------------------------------------------------------
def read_save_data(file)
pk8_self_variables_read_save_data(file)
$game_self_variables = Marshal.load(file)
end
end
43
Entertainment / Re: Pickup Lines.
September 15, 2010, 04:00:45 am
Take off all your clothes, sneak into her bedroom, wait until she falls asleep... :evil:
44
New Projects / Re: [XP] Colors
September 14, 2010, 03:59:23 am
The background story...
Have you been playing doodle god???
Looking good by the way
45
Welcome! / Re: Hi world
September 14, 2010, 02:32:47 am
Uhh... no :^_^':
*quickly covers some fabric with a pillow*

welcome by the way Emberstar, I'm kind of a newbie here too. :welcome:
46
Uhh... I'm using XP, on a XP laptop and it continues to show me the "Failed to obtain a trial serial number from the Ntitles server", after merging, with and without internet connection :'( :'(
47
General Discussion / Re: Screenshot Thread
September 13, 2010, 03:27:28 am
Just because I want to feel special
Spoiler: ShowHide


No, it is not blizz-abs, it's an event made telekinesis system! :haha:
48
Quote from: Blizzard on September 13, 2010, 02:20:03 am
Just apologizing by itself if a very mature action. Nobody expects you to be a man if you are just a child. But you shouldn't act like a baby when you are aware of what behavior is childish and what isn't. You can do it. But be aware that it's not going to be easy and there will be moments where you will be frustrated and tempted to give up. It's a long path. But if you decide to walk that path, decide to walk it till the end. Don't cast away people's opinions and suggestions. They are trying to help you after all. They see things that you can't see at that moment and they can give you a different perspective of things.

That's deep :)
49
Just because you apoligised
*levels up*
50
It still doesn't work. :'(
I don't get any errors, just nothing happens o_O

    @interpreter = Interpreter.new(0, false)
    @interpreter.setup($data_common_events[25].list, 25)
    @interpreter.setup_starting_event


between
    # Execute transition
    Graphics.transition(120)
and
    # Main loop
    loop do


and

      @interpreter.update
      # Switch to map screen
      $scene = Scene_Map.new
      $game_player.moveto($data_system.start_x, $data_system.start_y)

between
    if Input.trigger?(Input::C)

and
    end
  end
end


Any ideas?

Also, the common event has no trigger, nor any swith needed to be activated, is that right?
51
I'm placing it in Scene_Gameover

I've gone in and deleted $scene = Scene_Title.new , which takes the player back to the title screen (though I guess you know that...)
And have just shoved that little bit in there, I get the error on line 56 when dying.

Though I'm confused about this
QuoteC_ID is the event of the common event you are calling.


You mean, replace C_ID with the number of the common event in the database???
I don't get it. o_O
52
Entertainment / Re: Pickup Lines.
September 10, 2010, 05:55:34 pm
OT:
Ahh, a great pickup line is to hit them in their car, then you get out, get their insurance number, cell phone number, name, etc.
works brilliantly...
Until you get the bill :'(
53
Intelligent Debate / Re: Religion and Poverty
September 10, 2010, 06:31:15 am
Not unless there religion has several gods and demi-gods.
Then they blame the "evil" gods, and become MORE devout to the "good" gods
54
General Discussion / Re: RPG Maker PY (RMPY)
September 10, 2010, 06:05:50 am
I just had a thought, though maybe it wouldn't be run by the editor, though I would think it would be.

Anyway,
Issue Title: Conditional branches like spoilers
Description: It's annoying when you have a big long, complicated event, and you can't close up conditional branches.
Suggestion:  Like, you could click on the very left of a conditional branch, and it would close and open like spoiler tab in forums, to make it easier to scroll up and down, seeing only the parts you WANT to see. You could even make a little check box aswell, so that people who didn't want to use it could turn it off. :haha:
55
I did, and my brain died.
But I'll search again and see if I can get a straight answer out of that damn search box!
56
Can someone just quickly tell me the scripting equivalent of "Call common event" Please?
It's something along the line of "$game_common_event(#)"
But I can not for the life of me figure it out!
Thanks! :haha:
57
Script Troubleshooting / Re: Emoticon on Event 2.0
September 08, 2010, 08:48:01 pm
Couldn't you just edit the sprite in MS paint to put the explanation mark on top of them.
It would be far easier than editing a script, and you wouldn't need 2 events.
58
Projects / Games / Re: [COMPLETED] KALEIDOFLY
September 08, 2010, 04:38:46 am
Wow.
That's epic.
59
Troubleshooting / Help / Re: Putting an RMXP game online
September 06, 2010, 07:01:30 am
Quote from: stripe103 on September 06, 2010, 01:52:16 am
or find someone that want to do it for you.

Uhh.... yeah... because there are LOTS of people wanting to do all the complicated scripting to put your game on RMX-OS...
60
Role Playing and Interactive Story Telling / Re: Sticked
September 06, 2010, 03:01:58 am
((The old man is dead. Why call 911? :huh:))

You decided to ring 555-312-0987, you get out your celephone, dial the number and your greeted by the voice of a hot  sounding woman...


"Oh my, my, you sound like a big strong handsome man, ohh... you should come down to my house..." *humping noises and seducing voices are heard in the background* "Oh, wait a second... Ohhhhh.... Yeah, so big boy, come down to my house at Stick Road, number fifty two --" *BLIZZZ*
Hmm...
Ahh, well you say, and head down to number fifty two. OHH NOO!!! you cry as you reach number 52; there's two number 52's! well, there's no point turning back now, and you can hear music coming from one of them, so you step forward and knock on door number...

a) 52 a
b) 52 b