Script call for checking hit or miss!

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
Hey everyone, I've bee searching through the forums and the internet for a couple of hours and am unable to find what I'm looking for. I've combed through a few script call master lists and still haven't found what I'm looking for! Something tells me it just has to do with my wording!

Anyways all I'm trying to do is find the script call for when a skill hits. You know a simple "if skill hits then X, or else" type of thing conditional thing. I'm still a scripting noob so I'm not sure what the proper language/coding to use is. I'm assuming " if result.i****() " is not correct.

 Thanks guys!
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,366
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
I've moved this thread to Learning Javascript. Please be sure to post your threads in the correct forum next time. Thank you.



Can you tell us why you want this info?


The skill sequence doesn't exactly work that way, and I can't think of any reason why you would want to use such a script call (or rather, all the ideas I have about it are better solved using a different method). So if you tell us what you want to do instead of how you want to do it, we may point you to a solution.


otherwise, this might help you:
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
I've moved this thread to Learning Javascript. Please be sure to post your threads in the correct forum next time. Thank you.



Can you tell us why you want this info?


The skill sequence doesn't exactly work that way, and I can't think of any reason why you would want to use such a script call (or rather, all the ideas I have about it are better solved using a different method). So if you tell us what you want to do instead of how you want to do it, we may point you to a solution.


otherwise, this might help you:
Totally! So I'm using yanflys CTB battle system plugin. And I've created a skill which knocks targets back 3 spaces in the turn order using "ctb order: target, +3" in the notetags. However, A problem I've run into is that whether a not the attack hits, the order altering will always happen. So I figured within the notetags, I could create an if & else statement to make the turn order reliant on the hit, rather than an unconditional effect.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,366
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
won't work that way, because you'll need to get into yanfly's code for this, not the default code. Give a link to yanfly's plugin, and someone might be able to find the correct part of his sequences for you - but depending on how that CTB is structured internally the solution might not be easy or a single line.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
Hmmm, interesting. Here's the link to the plugin itself: http://yanfly.moe/plugins/en/YEP_X_BattleSysCTB.js

Edit: So here's the kind of thing I'm refering to notetag wise. In Yanfly's Battle Engine Core Script, he has this kind of option available for use in the notetags.

 

IF … ELSE STATEMENTS
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
For those familiar with programming, you can use if…else statements to perform different actions based on different conditions. Use ‘if’ to specify a block of code to be executed, if a specified condition is true. Use ‘else’ to specify a block of code to be executed, if the same condition is false. Use ‘else if’ to specify a new condition to test, if the first condition is false. Use ‘end’ to specify where the conditions are to end.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –


Usage Example:
if $gameSwitches.value(1)


action effect


else if $gameSwitches.value(2)


action effect


action effect


else


action effect


action effect


action effect


end
So all I'm trying to do is find whatever the game uses to recognize hits similar to the "$gameSwitches.value(1)" and set up the CTB turn order with the first condition. 
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top