Chaos Project

RPG Maker => Event Systems => Topic started by: Boba Fett Link on November 14, 2011, 03:31:27 pm

Title: [Resolved]Change running/jumping/sneaking in BABS?
Post by: Boba Fett Link on November 14, 2011, 03: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.
Title: Re: Change running/jumping/sneaking in BABS?
Post by: ShadowPierce on November 15, 2011, 06:21:22 am
Isn't that explained in the manual? I think it is... :/
Title: Re: Change running/jumping/sneaking in BABS?
Post by: Boba Fett Link on November 15, 2011, 03: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.
Title: Re: Change running/jumping/sneaking in BABS?
Post by: KK20 on November 15, 2011, 08:28:22 pm
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.
Title: Re: Change running/jumping/sneaking in BABS?
Post by: Boba Fett Link on November 16, 2011, 06:07:11 pm
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?
Title: Re: Change running/jumping/sneaking in BABS?
Post by: KK20 on November 16, 2011, 11:54:24 pm
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
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
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:
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
Title: Re: Change running/jumping/sneaking in BABS?
Post by: ForeverZer0 on November 17, 2011, 12: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]"
Title: Re: Change running/jumping/sneaking in BABS?
Post by: Boba Fett Link on November 17, 2011, 04:13:19 pm
Thanks both of you! I'll try it out!

Edit: KK20, I tried your version, and it works great! Thanks!