Pre-made (Yanfly's) Action Sequence Sharing and Discussions

PaybacK

Fire Crazed
Veteran
Joined
Oct 26, 2015
Messages
64
Reaction score
12
First Language
English
Primarily Uses
I'm a definite noob to the action sequences, so bear with me. However, I've had success up until this point. I'm wondering if someone can help me with my basic attack: pretty much just need it to change the sequence a bit for when the character is using a ranged attack or not. My code seems like it's fine, however i keep getting an error when I add (what i think) the code is to make an exception for 'missile' attacks. Here's my code, can someone help me figure out what's wrong with it? Thanks to whoever can help me out!!
Skill #1 will be used when you select

the Attack command.

<Timed Attack: circle>

<End Timed Attack>

<setup action>

if user.attackMotion() !== ‘missile’

immortal: targets, true

camera focus: user

zoom: 200%, 15

wait for camera

wait: 35

move user: targets, front, 20

wait for movement

else

display action

immortal: targets, true

camera focus: user

zoom: 200%, 15

wait for camera

wait: 35

JUMP user: 100%, 25

move user: targets, front, 25

wait for movement

</setup action>

<target action>

move user: forward, 65, 10

MOTION ATTACK: user

wait:10

ATTACK ANIMATION: target

wait for animation

action effect

</target action>

<finish action>

immortal: targets, false

CLEAR BATTLE LOG

reset zoom: 0

move user: return 12

wait for movement

face user: forward

</finish action>
My action sequence for regular attacks is similar to yours. I'm no pro at JavaScript (and I mean that, I know next to nothing about it) but from what you posted it looks like a syntax error right where your <setup action> begins.

Mine is:
if user.attackMotion() != 'missile'

with a single "=". You have two of them.
So try:
!= instead of !==
 

catwizard69

Villager
Member
Joined
Jul 27, 2018
Messages
16
Reaction score
0
First Language
English
Primarily Uses
RMMV
Thanks, totally works!!!! yeah i copypasted it from a website, so they must have accidentally gotten it wrong. for some reason, my "if" section applies to my "else" section and vice versa. I got it to work how i wanted by simply swapping them, but i'm confused. any idea why, from one noob to another? lol
 

PaybacK

Fire Crazed
Veteran
Joined
Oct 26, 2015
Messages
64
Reaction score
12
First Language
English
Primarily Uses
Thanks, totally works!!!! yeah i copypasted it from a website, so they must have accidentally gotten it wrong. for some reason, my "if" section applies to my "else" section and vice versa. I got it to work how i wanted by simply swapping them, but i'm confused. any idea why, from one noob to another? lol
Yep, because in JavaScript, the ! before the equals means 'not'. So != means 'not equal to', and 'else' is what happens if the condition isn't fulfilled, essentially swapping things around. To fix that, just remove the exclamation mark :)
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
224
Reaction score
199
First Language
Swedish
Primarily Uses
Hey, a quick question. I think you check if the target is an actor with "if (target.isActor()" and if it is an enemy with "if (target.isEnemy()".
So would the syntax be the same when you check who the user is? Like. "if (user.isEnemy()".

Asking so I can make a universal Attack skill instead of needing separate ones for Actor and Enemy.
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Hey, a quick question. I think you check if the target is an actor with "if (target.isActor()" and if it is an enemy with "if (target.isEnemy()".
So would the syntax be the same when you check who the user is? Like. "if (user.isEnemy()".

Asking so I can make a universal Attack skill instead of needing separate ones for Actor and Enemy.
Yes you can
 

Random Panda

Veteran
Veteran
Joined
May 3, 2016
Messages
48
Reaction score
3
First Language
English
Primarily Uses
Hi all, is there a way to pan the camera if its focused on something? Panning only seems to work for me if I haven't set a focus yet. Thanks in advance.
 

Azymus

Villager
Member
Joined
Mar 28, 2014
Messages
25
Reaction score
1
First Language
english
Primarily Uses
anyone can do action sequences for enounters animation in the battle before they are start to fights like pokemon? like this
 

Derf_Derf

Warper
Member
Joined
Oct 28, 2018
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
Here's a jump one inspired by the Mario and luigi series, it's a bit janky tho.


<target action>

CAST ANIMATION: 4

camera focus: user

zoom: 110%, 30

wait for zoom

move user: target, front, 20

wait for movement

wait: 5

se: (INSERT HERE)

CAST ANIMATION: 6

float user: 80%, 30

move user: target, center, 20

float user: 150%, 30

wait for float

float user: 70%, 10

float user: 0%, 10

wait for movement

wait for float

action animation

shake screen: 3, 9, 10

action effect

immortal: target, false

reset zoom: 10

reset camera: 10

jump user: 50%, 10

move user: home, 50

</target action>



<follow action>

zoom: 100%, 60

opacity not focus: 100%, 60

wait for opacity

</follow action>
 

Koblas

Veteran
Veteran
Joined
Aug 14, 2018
Messages
48
Reaction score
1
First Language
Italian
Primarily Uses
RMMV
I really don't understand why my plugin isn't working... I just copy your scripts and paste them under the skill note, but the only thing I get is a simple attack animation (and sometimes "it's not effective on bat (the enemy) etc..."
 

Azymus

Villager
Member
Joined
Mar 28, 2014
Messages
25
Reaction score
1
First Language
english
Primarily Uses
Anyone, who know how to do the action sequences of the dramatic entry like this video? watch it at 2:00 to 2:05. Pretty please?
 

SanZhang

Freelancer
Veteran
Joined
Aug 16, 2018
Messages
51
Reaction score
94
First Language
Indonesia
Primarily Uses
RMMV
Greetings, everyone,

I haven't read the last 80 pages, so I apologize if I've posted the similar / same animation seq:

I have been working on some katana animations and I thought I would share it here,
this one is inspired by Himura Battosai (iaido).

It still a simple one, but I hope you like it.. \(^ ^ )
Some comments and suggestions would be nice as well..

The character would put a stance with his back exposed to the enemy,
the enemy will be lured in, closing in.. SLASH..

<target action>
hide battle hud

camera focus: user, HEAD, 30
zoom: 1.3, 30
wait for camera

face user: backward
wait: 60

move target: user, front, 30
wait: 30

opacity user: 25%, 20
wait: 10

move user: target, back base, 5
wait for movement

action animation
action effect
wait: 10

move user: home
wait for movement

face user: forward
opacity user: 100%, 30
wait for opacity

show battle hud
</target action>
 

AnNihilate

Villager
Member
Joined
Nov 8, 2018
Messages
5
Reaction score
0
First Language
japanese
Primarily Uses
RMMV
Hello guys!

I apologize for my poor English firstly, but if I could get some help, I would appreciate it.

Actually, I'm now trying to work out how to identify whether actors hit the target or not with yanfly's action sequence. The problem is that whatever the basic attack or skill hit the target or is evaded, states will absolutely be added to targets if "add state x" command is included. In this case, I'm looking for a solution that I could identify the attack is hit or evaded. If it's hit, then states will be added to that target while it's not, states won't be added.

The reason why I don't just put states in the effect list is that I designed a weapon. If it is equipped by an actor, then the actor's attack will 100% add one state randomly from the states list every time. In other words, if user has this weapon, his every single attack can add different states with 100% rate. So, it can not be achieved if I just add states to the effect list on the skills page or to the traits list.

That's the reason why I want to distinguish hit and evasion for attack. Actually, I don't know how to write the syntax correctly because I'm not professional at JS.

Hope I could get solutions for modifying the code because you guys are intelligent! :)
<setup action>
immortal: target, true
camera focus: user
zoom: 150%, 15
wait for zoom
move user: point, 740, 400, 20
wait for movement
face user: target
</setup action>

<target action>
perform action
motion wait: user
reset camera
camera pan: left, 200, 15
wait for camera
animation 11: target
wait for animation
reset zoom: 5
wait for zoom
reset camera: 10
wait for camera
action effect
</target action>

<follow action>
wait for effect
immortal: target, false
if user. isLearnedSkill(31) && target. isDead()
tp +5%: user
end
if target.result().isHit
change variable 20 = Math.random()*10
if $gameVariables.value(20) >= 0 && $gameVariables.value(20) < 3
add state 1: target
if $gameVariables.value(20) >= 3 && $gameVariables.value(20) < 6
add state 2: target
if $gameVariables.value(20) >= 6 && $gameVariables.value(20) < 10
add state 3: target
end

</follow action>

<finish action>
move user: RETURN, 30
wait for movement
clear battle log
</finish action>
 

SanZhang

Freelancer
Veteran
Joined
Aug 16, 2018
Messages
51
Reaction score
94
First Language
Indonesia
Primarily Uses
RMMV
Greetings,

@Azymus
If I may suggest an idea, how about showing a picture (a sprite like those grass at the entry of the battle), zoomed in, etc through common event, then call it from an event on the map through conditional branch (if an x enemy appeared)?

@AnNihilate
I'm not a code savvy either, but if I may suggest, if it's me, I would still use traits to deliver the states on the weapon since the hit/miss rate itself seems depend on the actor's hit rate status itself (although as I was thinking of this idea, there's possibility that the weapon would produce more than 1 states on the enemy, but still it's a matter of luck on player's RNG),

And let's say if you want the enemy would only suffer one of the possible states from an attack;
as you are already found the script (if an attack is hit), i would probably tinker on it from the common event, conditional branch using "if script" and call it on the "attack" skill as a trait (normal attack)..or try call it from the weapon itself..

Using Yanfly's action sequence might be one of ways to make your idea works, but I just thought that as I'm not on that lunatic level yet, I would try another way around..
Either way, I apologize if it doesn't answer / suitable with your needs..

Best regards
 

AnNihilate

Villager
Member
Joined
Nov 8, 2018
Messages
5
Reaction score
0
First Language
japanese
Primarily Uses
RMMV
Greetings,

@Azymus
If I may suggest an idea, how about showing a picture (a sprite like those grass at the entry of the battle), zoomed in, etc through common event, then call it from an event on the map through conditional branch (if an x enemy appeared)?

@AnNihilate
I'm not a code savvy either, but if I may suggest, if it's me, I would still use traits to deliver the states on the weapon since the hit/miss rate itself seems depend on the actor's hit rate status itself (although as I was thinking of this idea, there's possibility that the weapon would produce more than 1 states on the enemy, but still it's a matter of luck on player's RNG),

And let's say if you want the enemy would only suffer one of the possible states from an attack;
as you are already found the script (if an attack is hit), i would probably tinker on it from the common event, conditional branch using "if script" and call it on the "attack" skill as a trait (normal attack)..or try call it from the weapon itself..

Using Yanfly's action sequence might be one of ways to make your idea works, but I just thought that as I'm not on that lunatic level yet, I would try another way around..
Either way, I apologize if it doesn't answer / suitable with your needs..

Best regards
Hello! Thank you for the reply!

I understand what you mean. Yes, I can use"change enemy state" command in the common event. But unfortunately, this command is unable to select the target that the actor attacks, it can only select the enemy index, which is enemies' order. This means, if actor attacks enemy No.2, a state will be added to enemy No.1. I think it's a kind of chaos. But it's a nice trying! Thank you very much.

Best wishes
 

Pots Talos

Veteran
Veteran
Joined
Jun 28, 2012
Messages
95
Reaction score
62
First Language
English
Primarily Uses
RMMV
Does anyone know how to check an enemies troop index number in an action sequence?

Like if I was making something like this:

Code:
<setup action>
if $gameTroop.members()[1]
    common event: 7
    else
if $gameTroop.members()[2]
    common event: 6
    else
if $gameTroop.members()[3]
    common event: 7
    end
    display action
</setup action>
I want the enemy to act a certain way in battle based on which enemy index number it is.
 

AnNihilate

Villager
Member
Joined
Nov 8, 2018
Messages
5
Reaction score
0
First Language
japanese
Primarily Uses
RMMV
Does anyone know how to check an enemies troop index number in an action sequence?

Like if I was making something like this:

Code:
<setup action>
if $gameTroop.members()[1]
    common event: 7
    else
if $gameTroop.members()[2]
    common event: 6
    else
if $gameTroop.members()[3]
    common event: 7
    end
    display action
</setup action>
I want the enemy to act a certain way in battle based on which enemy index number it is.
Code:
 if $gameTroop.enemyIndex() == 1
hey maybe you can try this one. But I'm not good at JS, I apologize if it not works.
 

Pots Talos

Veteran
Veteran
Joined
Jun 28, 2012
Messages
95
Reaction score
62
First Language
English
Primarily Uses
RMMV
Code:
 if $gameTroop.enemyIndex() == 1
hey maybe you can try this one. But I'm not good at JS, I apologize if it not works.
Thanks for the quick response. Unfortunately that didn't work. :frown:
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with The Witcher 3! Feel free to drop by!
I have a specialized class on intellectual property this semester (on Patent and Trademarks, Copyrights is next semester). Only had a quick overview of that in previous business law classes. I'll be able to help more people here when it comes to knowing what to do and your rights for intellectual property!
When you wanna write another pedantic post of your views on game dev... but your cousin and aunt have invited you to bowling
"Hey there! Hope you're having a nice day, you are awesome!"

(Of course the hand is awful :kaoswt: )
I need a new option on YouTube that goes "Dont recommend videos/channels in this language because I do not speak it"

Forum statistics

Threads
93,380
Messages
911,815
Members
122,874
Latest member
Meektot
Top