REMOVE STATE ON ATTACKING?
Posts
Pages:
1
author=Novalux
Can a state (say, invisibility) be removed on attacking an enemy (whether it hits or not)?
Which engine are you using? This can easily be done with RM2k3, in which you can just add remove X condition inside a monster group event page with the trigger set to "Hero X uses the command."
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Removed from the attacker, or the target?
In Ace you can set it so that the state has a certain percentage of being removed if hit by an attack. You can make this amount 100%.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
author=kory_toombsThat won't work if the attack misses.
In Ace you can set it so that the state has a certain percentage of being removed if hit by an attack. You can make this amount 100%.
It can't be part of the skill's effect either, for the same reason. Need a script, but it would probably be like, one line of code, if it's just for one specific effect.
author=LockeZ
Removed from the attacker, or the target?
Using Vx Ace (with Yanfly Battle Engine), I want the state to remove from the attacker, not the enemy, but stay if an attack isn't used. Think of it like a de-cloaking slash. I tried adding "remove by restriction: on attacking enemy" but it wasn't working. I could add remove invisibility from user to trigger before every attack, but there are multiple states I'd like to use this with.
I've used a script that does exactly what you want. I can't remember the link, but just search for 'Skill Self Effects' script for vx ace. I think it was written by Galv, though I'm not so sure.
I would've posted it here, but I can't since I'm on my phone so...
I would've posted it here, but I can't since I'm on my phone so...
Is attacking using a specific skill, or any offensive skill? Also should the invisibility be removed before or after the action occurs? This shouldn't be too hard to do via a small script, I can take a look at this when I get some time.
I'm going to have to go with for each specific skill, because I want it to make sense, which actions remove the state. For example another state would be Pillar, and it shouldn't be removed by, say, shooting a bow. Taking a flying leap onto an enemy below would remove the state.
Problem is, I'm not sure how to set it so that using a skill on an enemy will remove a state from the user, at least not without using Yanfly's follow-up skills, which means lots of unnecessary duplicates.
Any ideas?
Problem is, I'm not sure how to set it so that using a skill on an enemy will remove a state from the user, at least not without using Yanfly's follow-up skills, which means lots of unnecessary duplicates.
Any ideas?
Use this one:
And no, it's not mine. But it is free to use for non-commercial projects.
Just follow the instructions. It works fine, as far as I know.
NOTE: The number in the self effect note tag is the nth state you placed on the features of a skill.
#=============================================================================== # Skill Self Effects # By Jet10985 (Jet) # Requested by Touchfuzzy #=============================================================================== # This script will allow you to specify a skill's effects to target the user # instead of the target, on skills that don't already effect the user. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: item_effect_apply #=============================================================================== =begin To specify the effects, use this notetag in the skill's notebox: <self effect: 1> or <self effect: 1, 2, 3> to specify more than 1 effect -------------------------------------------------------------------------------- Use of this script could be as the following. You make a "Berserk Strike" skill, which does 200% damage to an enemy. You make the 2nd effect "Defense Down 50%" and want it applied to the user. You'd use this notetag: <self effect: 2> =end class RPG::Skill def self_effects if @self_effects.nil? @self_effects = [] self.note.each_line {|a| scan = a.scan(/<self[ ]*effect[ ]*\:[ ]*(\d+(?:[ ]*,[ ]*\d+)*)>/i) scan[0][0].scan(/\d+/).each {|b| @self_effects.push(@effects[b.to_i - 1]) if b.to_i >= 1 } } end @self_effects end end class Game_Battler alias jet3745_item_effect_apply item_effect_apply def item_effect_apply(user, item, effect, reffed = false) if item.is_a?(RPG::Skill) && item.self_effects.include?(effect) && !reffed user.item_effect_apply(user, item, effect, true) return end jet3745_item_effect_apply(user, item, effect) end end
Just follow the instructions. It works fine, as far as I know.
NOTE: The number in the self effect note tag is the nth state you placed on the features of a skill.
I keep getting this error:
line 37 NoMethod error occured, undefined method '' for nil:NilClass
Edit: supposed to be two empty square brackets inside the quotes.
It may be that certain Yanfly scripts I am using aren't compatible, but I've designed most of my battle system so far around them. Any ideas for a script like this compatible with Yanfly Battle Engine?
line 37 NoMethod error occured, undefined method '' for nil:NilClass
Edit: supposed to be two empty square brackets inside the quotes.
It may be that certain Yanfly scripts I am using aren't compatible, but I've designed most of my battle system so far around them. Any ideas for a script like this compatible with Yanfly Battle Engine?
Here's a quick script and demo project that adds/removes a state before/after a skill is used. Supposed to support multiple states, just add commas so 2,3,4 instead of just 2. Forgot to test. I'll get to it later.
Pages:
1















