I tried it. I even started a new game, deleted all characters but 1.
Then I did variable A = Character A's level
The end result variable A = 0
So I did
Then I did variable A = Character A's EXP
I added the character's EXP via the command.
The end result variable A = 0
Nothing seems to work.
This is in the event system not the scripts.
That's odd. It should be working...
Well, here's some code that you can add in with an event.
$game_variables[X]=$game_actors[Y].level
X= Variable ID, Y = Actor ID
I've noticed that some of VX script is missing little things here and there myself. For example, in lines 840-841 of the Game_interpreter, it looks like this: when 3 # Mul
$game_variables[i] = value
when it should look like thisLwhen 3 # Mul
$game_variables[i] *= value
I think the problem is coming from somewhere in line 750 to 775def command_122
value = 0
case @params[3] # Operand
when 0 # Constant
value = @params[4]
when 1 # Variable
value = $game_variables[@params[4]]
when 2 # Random
value = @params[4] + rand(@params[5] - @params[4] + 1)
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
actor = $game_actors[@parameters[1]]
actor = $game_actors[@params[4]]
if actor != nil
case @params[5]
when 0 # Level
value = actor.level
when 1 # Experience
value = actor.exp
when 2 # HP
value = actor.hp
when 3 # MP
value = actor.mp
when 4 # Maximum HP
value = actor.maxhp
when 5 # Maximum MP
value = actor.maxmp
when 6 # Attack
value = actor.atk
when 7 # Defense
value = actor.def
when 8 # Spirit
value = actor.spi
when 9 # Agility
value = actor.agi
end
end
You had a similar problem with variables not taking # of items in possession, and I believe it stems from the same problem with the code in that area. Using the script change that Modern algebra posted in this thread, http://rmrk.net/index.php/topic,25049.0.html (http://rmrk.net/index.php/topic,25049.0.html), the problem isn't happening between a brand new project and an old project that I have been running with his updated script.
Mmm, enterbrain made a mistake.
They must have decided that setting actor values to variables was no longer useful.
Try replacing:
actor = $game_actors[@parameters[1]]
with
when 4 # Actor
So the code should look like this:
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
when 4 # Actor
actor = $game_actors[@params[4]]
if actor != nil
case @params[5]
when 0 # Level
value = actor.level
when 1 # Experience
value = actor.exp
when 2 # HP
value = actor.hp
when 3 # MP
value = actor.mp
when 4 # Maximum HP
value = actor.maxhp
when 5 # Maximum MP
value = actor.maxmp
when 6 # Attack
value = actor.atk
when 7 # Defense
value = actor.def
when 8 # Spirit
value = actor.spi
when 9 # Agility
value = actor.agi
end
end
when 5 # Enemy
that is, I'm assuming you have the official english version where this was the case:
when 3
value = $game_party.item_number($data_items[@params[4]])
actor = $game_actors[@parameters[1]]
actor = $game_actors[@params[4]]
If I didn't constantly make errors just like this I'd criticize enterbrain right now. :P
It works!
I notice that they didn't even have a when 4.
This will be helpful to a lot of event gurus :-)
Thanks so much!
Since I assume this is an error present in all of the English versions of VX, do you mind if I sticky this topic? Maybe we can make it like an FAQ or something. Eventually, enterbrain will probably release a fix, but until then this topic could be useful to a lot of people. Anyway, as you are the owner, do you mind if I sticky this?
It seems like something that everybody will need fixed.
Sure sticky it. After all you made the solution :-)
Wow, this is quite a surprise.
MA you should ask enterbrain cash for finding the error.
Or the official english version for free at least. ^_^
maia found the error, not me. And I think I'd need to do something a little more impressive than fixing a minor oversight in the scripts that are open anyway.
I bought a GPS in December... Their instruction manuel was printed backward and upside down. The book opened right to left instead of left to right, then when you read it, everything was out of order. Some pages were upside down. It went 1, 5, 2, 6, 3, something.
The company said they'd send me a new book.... never saw it and its now March.
In February the GPS screws broke and I could open the GPS like a book. Sometimes the little things are an indication of the product.
uh wow
That's kinda deep?
i dont see any difference
The *. It's *=, not =. Ever notice the multiply feature not working?
EDIT: Holy mother of necroposting. Sorry.