death by moogles
Member
Code:
st = $game_variables[299]
$game_party.steps = st
What am I doing wrong?
st = $game_variables[299]
$game_party.steps = st
$game_party.steps = $game_variables[299]
BlueScope":24c08sna said:For whatever crazy reason you might need this... try this instead:
It looks like it should work, however I'm not sure that Game_Party actually has a method called steps... haven't worked with RMXP for a while ^^" Your error definately says that you'Re trying to use a method that's non-existant, so you might check for that.Code:$game_party.steps = $game_variables[299]
Either way, the easier way for you would be to find yourself Window_Steps or whatever it's called, and replace the variable drawn with $game_variables[299] - saves you the event that sets this as well. (that's right, events are actually unnecessary for system-ey things )
$game_party.steps = $game_variables[299]
That is exactly what I meant up there ^^death by moogles":jvcoonow said:I can't believe that I didn't think to increase $game_variables[299] in Game_Party instead of @steps. :|
$game_party.steps =
$game_variables[299]
$game_party.steps = 400 +
300 +
200
class Game_Party
attr_writer :steps
end
I misunderstood ;_;BlueScope":1qrq79c9 said:That is exactly what I meant up there ^^death by moogles":1qrq79c9 said:I can't believe that I didn't think to increase $game_variables[299] in Game_Party instead of @steps. :|
I tried that too. I've had to use the call script command to do things like that, and they'd always worked, but it didn't work this time. I guess it's because of what Brewmeister said.BlueScope":1qrq79c9 said:For future event madness, try this in a Call Script:
I'm not sure if this specific one will work, but it really should... stuff like this works, for example:Code:$game_party.steps = $game_variables[299]
Code:$game_party.steps = 400 + 300 + 200
I actually thought about this before I started the system, but I have no idea how I'd do it. The system is completely finished and it runs fine. I don't need to reset EVERYTHING. There are about twelve values that have to be reset; the game is extremely simple. Honestly, I'd love to do it this way, because it just seems so much easier. I just don't know how or where to start learning. I do, however, know how to do it with events, so that's what I did.BlueScope":1qrq79c9 said:So much for the 'answering your question' part; here comes the 'take your system, rip it apart, improve it, with MORE SCRIPTING' part
You might be going over this by hand, resetting each and every variable there might be in your scope of important things to reset. What you really want to do is use your already existing save methods, cut them in shape by replacing the file dump methods by variable assignments, and therefore create virtual saves. Doing this, your whole system will maybe take 20 mins to do, give or take, and you will neither have to worry about event anything nor script anything additionally, as everything you'd normally save now becomes reset on button press as well. Of course, you can customize this, if for example you don't want to reset your switches or variables.
Ah! I've wondered what the difference was, but it's never been of any consequence in anything that I've done, so I never thought to look into it. Thanks a lot!Brewmeister":1qrq79c9 said:If, at the top of Game_Party, you change the line:
attr_reader :steps
to
attr_accessor :steps
then
$game_party.steps = $game_variables[299]
will work.
attr_reader only creates a "steps" method that returns the value of @steps
attr_accessor also creates a "steps=" method that allows you to set the value of @steps
One problem is, that you might confuse lines if you change too much of the standard scripts. Whenever it says "add this code after line X" you have to check what line X is in the original script and where it is now in yours.Changing standard scripts is only bad if you're developing something to share, that someone else might try to implement and it's important that it doesn't create conflicts with other scripts. If it's just for your own game, and you know what you're doing, changing the scripts should not be a problem.
In fact, I have a couple projects where a bunch of the standard scripts are completely re-written.