I need a skill for my Star Wars game.
Force Push:
A Non-Damage Skill that knocksback the enemy back 5 squares. I can make it non damage. Unless there is a code in the BABS script I can add a small snippet in or something. Please I really need it before I release my demo.
*bump*
Please someone help!
If somebody decides to accept your request, it's simple as hell. He would just need to assign the @attacked variable in Map_Battler#skill_effect properly. It's set to BlizzABS.pixel by default which is 1 map square. That is done in the call apply_action_effect. Simply add a conditional branch that checks if the skill ID is in a number arrary and if it is, assign @attacked.
... Meh, screw it. It takes less time to do it than to explain it.
FORCEPUSH_SKILLS = [13, 14, 15]
FORCEPUSH_DISTANCE = 5
class Map_Battler
def skill_effect(character, _battler, skill)
return false if @battler == nil
return false if $DEBUG && @ai.basic != 0 && Input.press?(Input::CTRL)
@battler.current_action.kind = @battler.current_action.basic = 0
@battler.hpdamage, @battler.spdamage = 0, 0
result = @battler.skill_effect(_battler, skill)
if FORCEPUSH_SKILLS.include?(skill.id)
self.attacked = $BlizzABS.pixel * FORCEPUSH_DISTANCE
@animation_id = object.animation2_id if BlizzABS::Config::ANIMATIONS
@battler.damage, @battler.damage_pop = nil, false
@battler.hpdamage, @battler.spdamage = 0, 0
result = true
elsif result || @battler.hpdamage != 0 || @battler.spdamage != 0
apply_action_effect(skill)
$BlizzABS.utils.request_damage_sprite(self)
@battler.damage, @battler.damage_pop = nil, false
@battler.hpdamage, @battler.spdamage = 0, 0
result = true
end
$BlizzABS.AI.observe(_battler, @battler.damage) if _battler.is_a?(Game_Actor)
@charge = nil if result
return result
end
end
This should do it. Put this right under Blizz-ABS Part 3.
thats a... small one there...
Sorry Blizz. I would do these if I wasn't so messed up right now. :wacko: When I get myself back in order, I'll definitely be more responsive to requests in here.
Thanks blizzard.
One more question. Is there any way we can make certain skills be a certain distance? If thats too much trouble dont worry about it.Skil
Example:
Skill ID 4 only pushes 3 squares
Skill ID 5 only pushes 4
etc.
EDIT:
Its not working for me. I have it set to id 102 and pushback 10 and its not pushing him back. Its equipped to hotkey and it is taking my sp away.
Blizzy! I found a bug!
Basically, although you made it step backwards each frame, you still let it make its own move routes
Translation: It just makes it move really fast. You need to disable movement while @attacked is > 0. (double space for no apparent reason XD)
Native Blizz-ABS bug or bug related to this plugin? I admit that I didn't test it. xD
Well, its native i guess. If @attacked is greater than 1 (meaning the enemy has more than 1 frame of knockback), it will still execute its movement stuff as well. You only really notice it with this plugin though, although the code is in the ABS itself, not this plug.
That's actually the whole point of the @attacked variable. -_-
Its still not working for me.
Here are the scripts I have.
Dargor's Large Party
ABS 1
ABS 2
ABS 3
Force Push Plugin
THese are in order
Err, unless I'm not understanding something, this is how i see it:
the @attacked variable:
when it is greater than 0:
What it does now: maxes move speed and frequency and makes the character move backward each frame
What it should do: maxes move speed and frequency and makes the character move backward each frame AND STOP ALL OTHER MOVEMENT
Unless I'm totally reading you code wrong...
Yes, you are. This is how it works:
When the @attacked variable is assigned to a number greater than 0, remove all actions, remove all movement commands, add forced movement commands for moving backwards by 1 map square which is BlizzABS.pixel (pixel movement rate) times. This is done in BlizzABS::AI#prepare.
Naturally when the enemy gets pushed back and gets attacked again during the pushback, the first pushback should be cancelled.
bump
Please someone this isnt working for me or landith. We both tried and its not working.
bump again please can somebody fix it?