CS RULES!!!
I wrote a tutorial for you.
ok, open up the input.wdl in the template folder.
Find function _player_intentions()
replace it with this:
Code:
function _player_intentions()
{
// Set the angular forces according to the player intentions
aforce.PAN = -astrength.PAN*(KEY_FORCE.X+JOY_FORCE.X);
aforce.TILT = astrength.TILT*(KEY_PGUP-KEY_PGDN);
if(MOUSE_MODE == 0)
{ // Mouse switched off?
aforce.PAN += -astrength.PAN*MOUSE_FORCE.X*mouseview*(1+KEY_SHIFT);
aforce.TILT += astrength.TILT*MOUSE_FORCE.Y*mouseview*(1+KEY_SHIFT);
}
aforce.ROLL = 0;
// Set ROLL force if ALT was pressed
if(KEY_ALT != 0)
{
aforce.ROLL = aforce.PAN;
aforce.PAN = 0;
}
// Double the forces in case the player pressed SHIFT
/*-- if(KEY_SHIFT != 0)
{
aforce.PAN += aforce.PAN;
aforce.TILT += aforce.TILT;
aforce.ROLL += aforce.ROLL;
}--*/
// Limit the forces in case the player
// pressed buttons, mouse and joystick simultaneously
limit.PAN = 2*astrength.PAN;
limit.TILT = 2*astrength.TILT;
limit.ROLL = 2*astrength.ROLL;
if(aforce.PAN > limit.PAN) { aforce.PAN = limit.PAN; }
if(aforce.PAN < -limit.PAN) { aforce.PAN = -limit.PAN; }
if(aforce.TILT > limit.TILT) { aforce.TILT = limit.TILT; }
if(aforce.TILT < -limit.TILT) { aforce.TILT = -limit.TILT; }
if(aforce.ROLL > limit.ROLL) { aforce.ROLL = limit.ROLL; }
if(aforce.ROLL < -limit.ROLL) { aforce.ROLL = -limit.ROLL; }
// Set the cartesian forces according to the player intentions
force.X = strength.X*(KEY_W+KEY_FORCE.Y-KEY_S); // forward/back
force.Y = strength.Y*(KEY_A-KEY_D); // side to side
force.Z = strength.Z*(KEY_SPACE-KEY_CTRL); // up and down
if(MOUSE_MODE == 0)
{ // Mouse switched off?
force.X += strength.X*MOUSE_RIGHT*mouseview;
}
// Double the forces in case the player pressed SHIFT
/*-- if(KEY_SHIFT != 0)
{
force.X += force.X;
force.Y += force.Y;
force.Z += force.Z;
}--*/
// Limit the forces in case the player tried to cheat by
// operating buttons, mouse and joystick simultaneously
limit.X = 2*strength.X;
limit.Y = 2*strength.Y;
limit.Z = 2*strength.Z;
if(force.X > limit.X) { force.X = limit.X; }
if(force.X < -limit.X) { force.X = -limit.X; }
if(force.Y > limit.Y) { force.Y = limit.Y; }
if(force.Y < -limit.Y) { force.Y = -limit.Y; }
if(force.Z > limit.Z) { force.Z = limit.Z; }
if(force.Z < -limit.Z) { force.Z = -limit.Z; }
}
Then open up your levels .wdl and add include <input.wdl>; after the last include.
Then open your weapons.wdl, go to the bottom, and change this:
Code:
ON_CTRL weapon_fire;
to this:
Code:
//ON_CTRL weapon_fire;
Then find function weapon_fire()
it should look like this:
Code:
//////////////////////////////////////////////////////////////////////
// Desc: fire weapon
function weapon_fire()
{
weapon_firing = 1;
while(KEY_CTRL || MOUSE_LEFT) { wait(1); }
weapon_firing = 0;
}
// Desc: deselect weapon
function weapon_remove()
{
if(weapon != NULL)
{
weapon.INVISIBLE = ON;
weapon = NULL;
weapon_number = 0;
}
}
Change it to this(the red is the change):
Code:
//////////////////////////////////////////////////////////////////////
// Desc: fire weapon
function weapon_fire()
{
weapon_firing = 1;
while( MOUSE_LEFT ) { wait(1); }
weapon_firing = 0;
}
// Desc: deselect weapon
function weapon_remove()
{
if(weapon != NULL)
{
weapon.INVISIBLE = ON;
weapon = NULL;
weapon_number = 0;
}
}
I hope you understand this.
Email me if you have any questions.