Author Topic: Blockhead Bot Hole Jumping Problem  (Read 1422 times)

Does anyone know how I can make him stop jumping?


I have found this in the bot hole script.

Code: [Select]
function AIPlayer::hResetMoveTriggers( %obj )
{
%obj.setJumping(0);
%obj.setCrouching(0);

// confusing, but hasJetted is called when doing long jets
if( !%obj.hHasJetted )
%obj.setJetting(0);

%obj.setMoveSpeed( %obj.hMaxMoveSpeed );
// if( %obj.getDataBlock().canJet )
// %obj.hStopJetting();
}

As you see, %obj.setJumping(0); will make the bot stop jumping.

You could probably make an event for it as well. Using something like this:

Code: [Select]
function Player::stopJumping( %obj )
{
%obj.setJumping(0);
}
« Last Edit: May 19, 2013, 08:13:22 PM by Advanced Bot »

I have found this in the bot hole script.

Code: [Select]
function AIPlayer::hResetMoveTriggers( %obj )
{
%obj.setJumping(0);
%obj.setCrouching(0);

// confusing, but hasJetted is called when doing long jets
if( !%obj.hHasJetted )
%obj.setJetting(0);

%obj.setMoveSpeed( %obj.hMaxMoveSpeed );
// if( %obj.getDataBlock().canJet )
// %obj.hStopJetting();
}

As you see, %obj.setJumping(0); will make the bot stop jumping.

You could probably make an event for it as well. Using something like this:

Code: [Select]
function Player::stopJumping( %obj )
{
%obj.setJumping(0);
}
How do I make an event?

I might release a simple add-ons for this.

registerOutputEvent("Class","FunctionName","Arguments");

registerOutputEvent("Player","stopJumping");

registerOutputEvent("Class","FunctionName","Arguments");

registerOutputEvent("Player","stopJumping");
Actually, it would be

registerOutputEvent("Bot","stopJumping");

Because bots cannot be toggled with player events. I have tried it before.

Here is the event you want since in case other people want it. It won't work all the way, but the add-on is complete. http://forum.blockland.us/index.php?topic=232947.0