Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: G_G on February 02, 2009, 05:54:31 pm

Title: BABS Plug In re-unresolved
Post by: G_G on February 02, 2009, 05:54:31 pm
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.
Title: Re: BABS Plug In
Post by: G_G on February 04, 2009, 01:55:27 am
*bump*

Please someone help!
Title: Re: BABS Plug In
Post by: Blizzard on February 04, 2009, 06:36:02 am
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.
Title: Re: BABS Plug In
Post by: Sally on February 04, 2009, 06:37:19 am
thats a... small one there...
Title: Re: BABS Plug In
Post by: winkio on February 04, 2009, 05:30:50 pm
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.
Title: Re: BABS Plug In
Post by: G_G on February 04, 2009, 05:33:48 pm
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.
Title: Re: BABS Plug In(resolved)
Post by: winkio on February 04, 2009, 09:16:28 pm
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)
Title: Re: BABS Plug In(resolved)
Post by: Blizzard on February 05, 2009, 06:21:53 am
Native Blizz-ABS bug or bug related to this plugin? I admit that I didn't test it. xD
Title: Re: BABS Plug In(resolved)
Post by: winkio on February 05, 2009, 09:13:30 am
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.
Title: Re: BABS Plug In(resolved)
Post by: Blizzard on February 05, 2009, 09:23:17 am
That's actually the whole point of the @attacked variable. -_-
Title: Re: BABS Plug In(resolved)
Post by: G_G on February 05, 2009, 05:39:55 pm
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
Title: Re: BABS Plug In re-unresolved
Post by: winkio on February 05, 2009, 07:24:35 pm
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...
Title: Re: BABS Plug In re-unresolved
Post by: Blizzard on February 06, 2009, 09:53:55 am
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.
Title: Re: BABS Plug In re-unresolved
Post by: G_G on February 07, 2009, 09:37:22 am
bump

Please someone this isnt working for me or landith. We both tried and its not working.
Title: Re: BABS Plug In re-unresolved
Post by: G_G on February 08, 2009, 10:08:34 am
bump again please can somebody fix it?