Game Development Community

Player and keyboard actions - 1.4

by James · in Torque Game Engine · 11/28/2005 (5:27 am) · 4 replies

Not sure if this has been covered elsewhere - cain't find it if it has so apologies if this is a repeat.

1. The space-bar jump on the game character is not as responsive as in TGE 1.3. Specifically, you jump and there is then a delay before you can jump again. I'm assuming a "busy" flag set somewhere when the character jumps but I'll have to track it down as I'm not sure where to look just yet.

2. In the world editor mode: The keyboard is still active on the player character when you editing. Has someone found or working on a fix for this?

Appreciate any and all feedback :)

Cheers all

#1
11/28/2005 (5:33 am)
Server\player.cs take a look at
jumpForce = 8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 15;

   recoverDelay = 9;
   recoverRunForceScale = 1.2;
#2
11/28/2005 (9:42 am)
Ah. There it be :)

Thanks.

Any word on the keyboard "issue"?

Cheers
#3
11/28/2005 (5:52 pm)
2) It works fine when a text box is in focus, so that shouldn't cause any problems.
#4
10/19/2006 (11:26 am)
Genesis, please, how can I modify the jumpdelay of the "tutorial.base" folder?

in C:\Torque\SDK\example\tutorial.base\server\player.cs there only is the folloving code:

//-----------------------------------------------------------------------------
// Torque Game Engine 
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

// Load dts shapes and merge animations
datablock TSShapeConstructor(PlayerDts)
{
   baseShape = "~/data/shapes/player/player.dts";
   sequence0 = "~/data/shapes/player/player_root.dsq root";
   sequence1 = "~/data/shapes/player/player_forward.dsq run";
   sequence2 = "~/data/shapes/player/player_back.dsq back";
   sequence3 = "~/data/shapes/player/player_side.dsq side";
   sequence4 = "~/data/shapes/player/player_fall.dsq fall";
   sequence5 = "~/data/shapes/player/player_land.dsq land";
   sequence6 = "~/data/shapes/player/player_jump.dsq jump";
   sequence7 = "~/data/shapes/player/player_standjump.dsq standjump";
   sequence8 = "~/data/shapes/player/player_lookde.dsq look";
   sequence9 = "~/data/shapes/player/player_head.dsq head";
   sequence10 = "~/data/shapes/player/player_headside.dsq headside";
   sequence11 = "~/data/shapes/player/player_celwave.dsq celwave";
};

datablock PlayerData(PlayerShape)
{
   renderFirstPerson = false;
   shapeFile = "~/data/shapes/player/player.dts";
};


//----------------------------------------------------------------------------
// PlayerShape Datablock methods
//----------------------------------------------------------------------------

function PlayerShape::onAdd(%this,%obj)
{
   // Called when the PlayerData datablock is first 'read' by the engine (executable)
}

function PlayerShape::onRemove(%this, %obj)
{
   if (%obj.client.player == %obj)
      %obj.client.player = 0;
}

function PlayerShape::onNewDataBlock(%this,%obj)
{
   // Called when this PlayerData datablock is assigned to an object
}

I tried to insert the following code ( and a few variations from C:\Torque\SDK\example\starter.fps\server\scripts\player.cs ) but it didn't work:

datablock PlayerData(PlayerBody)
{

   jumpForce = 8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 15;

   recoverDelay = 9;
   recoverRunForceScale = 1.2;

};