In battle dialogue only after attacking.

centaur66

Villager
Member
Joined
Apr 18, 2019
Messages
27
Reaction score
2
First Language
english
Primarily Uses
RMXP
I've been messing with common events and skills all day so i figured i'd enlist some of your help. I'm trying to make it so that a character will go through a script of dialogue but only when the character attacks. i dont want the story to progress if for example the player guards or waits a turn. Thanks in advance.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Add this to your damage formula and then use the switch X to trigger the dialogue using a troop event. It is not perfect as it will not trigger if you miss the attack, but it is the closest thing you can do without using scripts, at least as far as I know.
Code:
$game_switches[X]=true if a==$game_actors[Y]
IMPORTANT NOTICE
Damage should go AFTER that in the formula. If you put damage before that, the skill is no longer going to deal any damage.
 

centaur66

Villager
Member
Joined
Apr 18, 2019
Messages
27
Reaction score
2
First Language
english
Primarily Uses
RMXP
Add this to your damage formula and then use the switch X to trigger the dialogue using a troop event. It is not perfect as it will not trigger if you miss the attack, but it is the closest thing you can do without using scripts, at least as far as I know.
Code:
$game_switches[X]=true if a==$game_actors[Y]
IMPORTANT NOTICE
Damage should go AFTER that in the formula. If you put damage before that, the skill is no longer going to deal any damage.
Thanks much! What is the Y variable meant to be used for?

EDIT:
Thanks much! What is the Y variable meant to be used for?
also (sorry for the double reply) could you show me how you would use this in the actual editor? I keep getting a syntax error that says "expecting $end", Thanks in advance.
 
Last edited by a moderator:

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
It is not a variable, it represents the ID of your actor. I assumed that you only want it to happen when a certain actor attacks since you wrote using the singular form. If you want it to happen for any actor use
Code:
a.actor?
Instead of
Code:
a==$game_actors[X]
It is possible that you have to use the following notation:
Code:
if condition_goes_here; $game_switches[X] =  true; end; formula_goes_here
"condition" is one of the two mentioned above, just pick the most appropriate one.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,867
Reaction score
5,240
First Language
Dutch
Primarily Uses
RMXP

centaur66, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


I've merged your two posts together this time. In the future, if you want to add something please use the 'Edit' button to do so.
 

centaur66

Villager
Member
Joined
Apr 18, 2019
Messages
27
Reaction score
2
First Language
english
Primarily Uses
RMXP
It is not a variable, it represents the ID of your actor. I assumed that you only want it to happen when a certain actor attacks since you wrote using the singular form. If you want it to happen for any actor use
Code:
a.actor?
Instead of
Code:
a==$game_actors[X]
It is possible that you have to use the following notation:
Code:
if condition_goes_here; $game_switches[X] =  true; end; formula_goes_here
"condition" is one of the two mentioned above, just pick the most appropriate one.
This is the error message that comes up when i try to use it in battle. I'm not quite sure what to change, thanks again for your help.

NEVERMIND!! i just adjusted a few things, i didnt need the zeros before the x and y numbers. Thank you so much for your help.
 

Attachments

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
If your query is fully resolved, please Report your post and ask for the thread to be closed. Mods might not see a post, but they will see a Report.
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

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.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top