RMMV YEP ActSeqPack: Check if character has a specific weapon type.

NoShirtstann

Villager
Member
Joined
Nov 13, 2018
Messages
19
Reaction score
3
First Language
Englush
Primarily Uses
RMMV
Hey folks,

So I've run across a small problem.

I've developed an animation using the ActionSequencePack for the the standard attack, but I don't want that sequence to be used if the actor has a bow or missle type weapon.

Just want to use the standard animation for now.

Is there a way to have the plugin check if the actor has a specific weapon ID and change the animation sequence based on that?

Any and all help would be awesome!
 
Last edited:

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
600
Reaction score
165
First Language
English
Here is a snippet from one of my action that should help:



if user.attackMotion() !== 'missile'

move user: targets, front, 20

else

perform start

end


Pretty sure the opposite of "!==" is "===" , if you want to word it that way.
 

Pots Talos

Veteran
Veteran
Joined
Jun 28, 2012
Messages
123
Reaction score
103
First Language
English
Primarily Uses
RMMV
You could add a conditional to check if using a missile attack with something like:

Code:
if user.attackMotion() !== 'missile'
 

NoShirtstann

Villager
Member
Joined
Nov 13, 2018
Messages
19
Reaction score
3
First Language
Englush
Primarily Uses
RMMV
Here is a snippet from one of my action that should help:



if user.attackMotion() !== 'missile'

move user: targets, front, 20

else

perform start

end


Pretty sure the opposite of "!==" is "===" , if you want to word it that way.

That worked amazing thank you!

Had to modify the coding a bit, but it worked out.

Here is what I ended up with.

Code:
<target action>

immortal: targets true

if user.attackMotion() !== "missile"

    move user: target, front base, 30

    wait for movement

    perform action

    action animation: target

    wait for animation

    action effect

    wait for effect

    perform finish

else

    perform action

    action animation: target

    wait for animation

    action effect

    wait for effect

    perform finish

end

</target action>
Also !== is the opposite of ==.

!== : does not equal

== : equals exactly
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,219
Reaction score
1,629
First Language
EN
Primarily Uses
RMMZ
Also !== is the opposite of ==.

!== : does not equal

== : equals exactly
Not quite:
  • != is the logical inverse of == (loose equality);
  • !== is the logical inverse of === (strict equality).
Basically, A === B cannot be true if A and B are of different types, e.g. string vs number, whereas A == B might be true depending on the exact values. More details:
 

NoShirtstann

Villager
Member
Joined
Nov 13, 2018
Messages
19
Reaction score
3
First Language
Englush
Primarily Uses
RMMV
That worked amazing thank you!

Had to modify the coding a bit, but it worked out.

Here is what I ended up with.

Code:
<target action>

immortal: targets true

if user.attackMotion() !== "missile"

    move user: target, front base, 30

    wait for movement

    perform action

    action animation: target

    wait for animation

    action effect

    wait for effect

    perform finish

else

    perform action

    action animation: target

    wait for animation

    action effect

    wait for effect

    perform finish

end

</target action>
Not quite:
  • != is the logical inverse of == (loose equality);
  • !== is the logical inverse of === (strict equality).
Basically, A === B cannot be true if A and B are of different types, e.g. string vs number, whereas A == B might be true depending on the exact values. More details:
My mistake. Thank you for correcting me. I wasn't aware that there was two separate types of operator comparison.

Learn something new everyday =D
 

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

Latest Threads

Latest Posts

Latest Profile Posts

To composers out there, what are atleast 4 instruments overall I need to have to make my music not feeling empty? I'm here stuck trying to make my own battle music but it kinda sounds... Not intense?
My computer broke yesterday, so no RPG maker for at least a week until I can get it repaired. :(
Just wanted to share how my game won 1st place in a game jam for itch.io. Everyone else used Unreal, Unity, GMS2, Godot, etc but I used RPG Maker 2003 :guffaw: It just shows that you can create a good game and it doesn't matter which engine you use
Working on cutscenes~

if your game is the first (or ONLY) in a series and still has a colon in its title, you are a bad person and I hate you...... jk.

who could ever hate BETWEEN: TWO SOULS?

Forum statistics

Threads
107,406
Messages
1,029,456
Members
139,512
Latest member
nedafr
Top