Author Topic: [Resolved]Change running/jumping/sneaking in BABS?  (Read 2488 times)

Offline Boba Fett Link

  • Enterbrain Spy
  • Ethereal Devastator
  • ****
  • Posts: 298
  • LV: 4
  • Gender: Male
  • DANGER ZONE!
    • View Profile
[Resolved]Change running/jumping/sneaking in BABS?
« on: November 14, 2011, 10:31:27 PM »
Is there a callscript for BABS that allows you to change the running speed, the jumping distance, and the sneaking speed in BABS?

The reason I want to know is because I am making an evented horse system.


Edit: Also, is there a callscript to turn off catapiller in BABS? Because when the first player is ridding the horse, the second party member's head is in an awkward position... Never mind. This one is in the Manual. However,t he other ones aren't.
« Last Edit: November 18, 2011, 01:24:55 AM by Boba Fett Link »
This post will self-destruct in 30 seconds.

Offline ShadowPierce

  • CP Guardian
  • Astral Trancist
  • *****
  • Posts: 582
  • LV: 15
  • Gender: Male
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #1 on: November 15, 2011, 01:21:22 PM »
Isn't that explained in the manual? I think it is... :/

(click to show/hide)
(click to show/hide)

Offline Boba Fett Link

  • Enterbrain Spy
  • Ethereal Devastator
  • ****
  • Posts: 298
  • LV: 4
  • Gender: Male
  • DANGER ZONE!
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #2 on: November 15, 2011, 10:50:04 PM »
There isn't one listed...The manual only lists callscripts specific to the battle aspect of BABS, so I was hoping there might still be one.
This post will self-destruct in 30 seconds.

Online KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2988
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #3 on: November 16, 2011, 03:28:22 AM »
After looking through the code a bit, I found nothing. Speeds are only defined by the constants you assign it before start up. The only suggestion I could give is use a Common Event that checks if the player has the Key pressed and change '$game_player.move_speed' to whatever value you want it to be. I don't know if using the same Key you have assigned to 'Run' would create any conflicts.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Boba Fett Link

  • Enterbrain Spy
  • Ethereal Devastator
  • ****
  • Posts: 298
  • LV: 4
  • Gender: Male
  • DANGER ZONE!
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #4 on: November 17, 2011, 01:07:11 AM »
That would work. However, I'd have to also event the jumping, too.

Couldn't I assign the jump distance to a variable in the script? Or is that impossible?
This post will self-destruct in 30 seconds.

Online KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2988
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #5 on: November 17, 2011, 06:54:24 AM »
Jumping distance takes current speed minus whatever is considered normal speed and then adds the value of "JUMPING". So, the game already processes that for you.

Played around with this a bit, and came to some way of implementing the feature. Mind you, this is a really amateur fix; there's probably a much better way going about solving this.

1.) Open Part 2 of BlizzABS. Locate 'def update_control' (Line 3592). A few lines below, find 'player.move_speed = player.normal_speed' (Line 3596) and replace it with
Code: [Select]
player.move_speed = player.normal_speed unless $game_switches[id]Replace 'id' with whatever switch your horse event activates on.
Go down a bit and find 'player.move_speed = Config::RUN_SPEED' (Line 3605) and replace it with
Code: [Select]
player.move_speed = Config::RUN_SPEED unless $game_switches[id]Again, replacing 'id' with the switch you want.

2.) Open Database and go to Common Events. Make it Parallel Process with the condition switch the same ID as what you just put above. Insert Script:
Code: [Select]
if Input.press?(Input::Run)
$game_player.move_speed = 6
else
$game_player.move_speed = 4
end
Change the move speed values to whatever you want.

Worked for me. Like I said, very crude fix...  :P



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #6 on: November 17, 2011, 07:00:03 AM »
You could always just set the move speed to a variable then change it to whatever you wanted to whenever you wanted to.
So instead of "player.move_speed = player.normal_speed", you could have player.move_speed = $game_variables[ID]"
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Boba Fett Link

  • Enterbrain Spy
  • Ethereal Devastator
  • ****
  • Posts: 298
  • LV: 4
  • Gender: Male
  • DANGER ZONE!
    • View Profile
Re: Change running/jumping/sneaking in BABS?
« Reply #7 on: November 17, 2011, 11:13:19 PM »
Thanks both of you! I'll try it out!

Edit: KK20, I tried your version, and it works great! Thanks!
« Last Edit: November 18, 2011, 01:15:41 AM by Boba Fett Link »
This post will self-destruct in 30 seconds.