Need a single line of code for Falcao Pearl ABS

Status
Not open for further replies.

KingHazeel

Veteran
Veteran
Joined
Jul 5, 2018
Messages
125
Reaction score
5
First Language
English
Primarily Uses
RMVXA
I'm using Falcao Pearl ABS:

https://www.rpgmakercentral.com/topic/8809-falcao-pearl-abs-liquid-v3-update/

In my game, I've been having trouble properly balancing the main weapon and the skills. The damage output tends to lean in one way or another where the skills are either too powerful and make the weapon redundant, too costly and never used, or the difference is negligible and skills are pointless. One of my friends suggested I gave the main weapon a special perk aside from that that makes it unique and useful. After trying a few things out, I thought maybe the main weapon can have a unique ability that allows the player to run and attack at the same time.

So after playing around with the script, I found the three areas that dictated the player movement behavior:

This stops the player.

def force_stopped?
return true if @anime_speed > 0 || @knockdown_data[0] > 0 ||
@stopped_movement > 0 || @hookshoting[0] || @angle_fx != 0.0
return true if @making_spiral
return false
end

This stops the running animation.

alias falcaopearl_update_anime_pattern update_anime_pattern
def update_anime_pattern
return if @anime_speed > 0 || @knockdown_data[0] > 0
falcaopearl_update_anime_pattern
end

This sets the character to a still frame while they use their tools.

if @anime_speed > 0
@Pattern = 0
@anime_speed -= 1
end

The player stopping is dependent on the animation speed. But I think there's an easy fix to this. If I made and condition "if animation speed is greater than 0 and the player is using something other than a weapon" then the player would be able to move freely while swinging their main weapon. I'm not familiar with Ruby, but I'm guessing it'd look something like this?

def force_stopped?
return true if (@anime_speed > 0 && !toolplayerisusing.is_a?(RPG::Weapon)) || @knockdown_data[0] > 0 ||
@stopped_movement > 0 || @hookshoting[0] || @angle_fx != 0.0
return true if @making_spiral
return false
end

However, I don't know how to properly check if the current tool the player is using is a weapon or not. I was wondering if anyone with more coding experience could tell me the appropiate way to check? Thank you!
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,254
Reaction score
1,254
First Language
Spanish
Primarily Uses
RMVXA
Code:
character.equips[0].is_weapon?
I think.
I always get equips and equip_slots mixed up, but all inventory items should respond to .is_weapon?, because that's defined in the base *item* class, which all items are.
"character" would depend on how you're grabbing the player, or where that code is supposed to go. If that's supposed to belong to an actor object, then you don't grab the character, you just run
Code:
equips[0].is_weapon?
because equips is a property of actors.
 

KingHazeel

Veteran
Veteran
Joined
Jul 5, 2018
Messages
125
Reaction score
5
First Language
English
Primarily Uses
RMVXA
I tried all three. Each time I got "undefined local variable or method" 'equips/equips_slots/character' for Game Player".

EDIT: OK I tried this:

(@anime_speed > 0 && $game_party.battle_members[0].equips[0].is_a?(RPG::Weapon))

And it functions...but it doesn't do what I want. Basically it stops the player if they have the weapon equipped and doesn't stop them if it isn't equipped. However, what I want to do is stop them depending on whether they're using the weapon skill or not.

EDIT 2: OK I found an alternative solution by adding a true/false variable that is used to determine whether the player can move and use their weapon/skill or not.
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

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.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top