Vx ace skill calling common event problem

JacAttac

Warper
Member
Joined
Jul 4, 2019
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I know vx ace is a bit old, but I'm really hoping for some help here. In the game I am making, I'm trying to make one of my characters transform into different animals in battle. I have a skill that allows him to turn into an animal, the skill also activates a state for all the stat changes, and a common event to change his graphic into the animal I want. The skill and state work, and I have the stat changes I want, but whenever I test the skill, my character never transforms into the desired animal. I've checked pretty much everywhere on the internet, But I can't seem to find any solutions. If it helps, I used the following YouTube video as reference for making my transformation:


I've also added three scripts to help make a side view battle system that may be the cause of the issue. I'm not a hundred percent sure. if it helps, I'll also provide the links where I found them.

Reedo's Simple Side Battle System Ace Ed https://forums.rpgmakerweb.com/inde...-simple-side-battle-system-ace-edition.18189/

Yanfly ace core engine https://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-core-engine/

yanfly battle engine https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/

If anyone would be willing to help me out with this problem, I would really appreciate it. Thanks in advance and have a great day.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
We have to tale a look at your skill and common event to know that. Without seeing that we cannot say anything for sure.

P.S. VX Ace is a great engine, no matter how old it is.
 

JacAttac

Warper
Member
Joined
Jul 4, 2019
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
We have to tale a look at your skill and common event to know that. Without seeing that we cannot say anything for sure.

P.S. VX Ace is a great engine, no matter how old it is.
Here's the skill, common event, and state:Screenshot (21).png Screenshot (22).png Screenshot (23).png
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Your event is changing the normal actor graphic, but the script you are using does not copy the character object. It creates a completely new object instead.
Code:
for actor in $game_party.battle_members
  gc = Game_Character.new
  gc.set_graphic(actor.character_name, actor.character_index)
Changing it in the default character does not affect the one used to draw the sprite. You have to change it directly from the battle sprite accessing it from
Code:
SceneManager.scene.instance_variable_get(:@spriteset)
That will give you access to the whole spriteset.

That object has another instance variable called
Code:
@actor_sprites
among those sprites you have to modify the one with the same index your character has in your party formation (if it is the 3rd member, then you have to access @actors_sprites[2]) and then you have to set a new bitmap for that sprite. I didn't read the whole code, but since it is a sprite object, you should be able to do it using the following call:
Code:
sprite.bitmap = Bitmap.new(rat_bitmap_file)
I honestly recommend modifying the script and adding a method that does that for you. Having to do this for each different form your actor can change into is going to be quite annoying. Unfortunately, even reading unformatted code is quite annoying. I hope you can forgive me if I did not write anything more specific, but reading that code was very painful.
 

JacAttac

Warper
Member
Joined
Jul 4, 2019
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Thanks for taking the time to look at my problem. But the thing is, I've never coded on Ruby before.
For SceneManager.scene.instance_variable_get:)@spriteset), Do I need to put it in the common event, or in the script itself?
Also, how exactly would I create the method for the bitmaps?
I've had plenty of experience with coding before, But I've mainly used Python and Javascript, and would really appreciate some help. And again, thanks for taking the time to look at my problem. I really appreciate it.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Do I need to put it in the common event, or in the script itself?
It depends on how you want to implement it: if you want to write a short script and simply call the new method you wrote you can put it in the script, otherwise you can put it in the common event using the Script command.
Also, how exactly would I create the method for the bitmaps?
First of all the method is for Game_Interpreter and not for Bitmap, this way you can use it with a very short script call. You can add more methods to a certain class by simply doing this:
Code:
class Game_Interpreter
  def my_method
    do_something
  end
end
Now, for the ruby syntax part, since that would take a long time to explain, especially if you are an experienced programmer you should have no problem to adapt to the new syntax. You can find all the necessary information in the Help file (F1 in the engine) under "Ruby Syntax".
 

JacAttac

Warper
Member
Joined
Jul 4, 2019
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Okay, so I started putting the method at the bottom of my reedo script for the side view battle system and it looks something like this:
animal mode start.png
I Started testing, and the first time I did, I got this error:
Script 'Game_Interpreter' line 1411:NameError occurred.

Undefined local variable or method 'sprite' for
#<Game_Interpreter:0xd369040>
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top