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
167
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,221
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 Profile Posts

rux
MUCLSES!!! :epicface: :epicface:
I have trauma after accidentally stumbling upon vore CYOA on text adventures and then reading the description "unwilling and willing" "one half lives inside other half" Oh my.... And peoples comments... "please add pregnant" "very good" "the best vore CYOA ive ever seen"...what...I wanna vomit, seriously. Its horrible.
If you're reviewing someone else's game, don't focus only on the negative and criticize them. Use positive constructive feedback. As game developers, we need to empower one another; not put each other down.
just posted a song I made for my game a while back... I sampled the HEY from Earthworm Jim's Snot a problem levels lol...
Based on this screenshot alone, which one would you sell, and which to equip?

Forum statistics

Threads
107,482
Messages
1,030,003
Members
139,612
Latest member
Imjeax
Top