C7A7L7V7I7N

Villager
Member
Joined
Jun 20, 2017
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMV
So, I've been watching SoulPour777's Sprite Button tutorial: .

I am using this as a basis for writing a script which enables sprite button commands in the battle scene (intended for touch screen), and removing the default windowed command system.

At first: everything was going great! I had the actorCommandWindow removed and my three sprite buttons were on screen and positioned, ready to assign functions to them.

I was having trouble finding a solution to scripting the buttons to forceaction actor skill(x). Here's what I was trying:
Scene_Battle.commandHighAttack = function(){
BattleManager.ForceAction.actor.$dataSkills[1]
};
Result: I would get an error along the lines of 'Error [something, something] bind undefined'

when pressing F8 for further detail it kept redirecting me to this line within my Sprite button:
this._AttackButton1.setClickHandler(this.commandHighAttack.bind(this));

I cannot reenact this error or provide any more details as shortly after this: my plugin suddenly stopped making any changes to my project!
Details: https://forums.rpgmakerweb.com/index.php?threads/script-changes-not-showing-up-in-my-project.80474/

Help to either of my problems would be much appreciated!!!! ^_^
 

Gamefall Team

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
348
Reaction score
473
First Language
Italian
Primarily Uses
RMMZ
EDIT:
Well, I'm not sure about all the logic you're working on, but I first error is here:
Scene_Battle.prototype.commandHighAttack = function(){
BattleManager.forceAction(BattleManager.actor()) \\ I noticed another errors here too, this is not the right way for what are you trying to reach.
};

You missed the prototype statement for the Scene Battle.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
If it's behaving as if your plugin isn't even there, then it's likely because you have an error in your plugin. Open the dev tools window (F8) and go to the Console tab. Look for errors to do with your plugin.
 

C7A7L7V7I7N

Villager
Member
Joined
Jun 20, 2017
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thank you both Gamefall Team and Shaz! ^_^

I'm trying to make the sprite button active skillId 1 only.

Gamefall Team, I tried adding this function to the script and binding it to my sprite button. I am not getting any errors, however my biutton is not doing anything...

Scene_Battle.prototype.commandHighAttack = function(){
BattleManager.forceAction(BattleManager.actor(1, 1))

Am I doing something wrong with the (1,1)) part? 1 being skillId #1 and 1 being Target 1
 

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

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top