Weapon Kick
by Daniel Neilsen · in Torque Game Engine · 10/28/2001 (1:05 pm) · 2 replies
I want the weaponry in my game to have weapon kick.
ie. When you fire the weapon, your player crosshair kicks upwards so you physically have to aim the weapon.
I thought about doing a client side function but it could be altered easily by a client and hence, be a cheat.
Does anyone have any ideas on how to achieve this so
that it cannot be altered by a client or if there is a built in way to do this?
ie. When you fire the weapon, your player crosshair kicks upwards so you physically have to aim the weapon.
I thought about doing a client side function but it could be altered easily by a client and hence, be a cheat.
Does anyone have any ideas on how to achieve this so
that it cannot be altered by a client or if there is a built in way to do this?
About the author
#2
Here is my thoughts on achieving this.
1) Make a server side function that is called from the script.
2) From the ghost, find the real player
3) Somehow make the engine think the player has moved the mouse.
Do you guys think that would work?
Does anyone have an example as to how to find the real player from the ghost?
11/04/2001 (12:26 pm)
ok,Here is my thoughts on achieving this.
1) Make a server side function that is called from the script.
2) From the ghost, find the real player
3) Somehow make the engine think the player has moved the mouse.
Do you guys think that would work?
Does anyone have an example as to how to find the real player from the ghost?
Torque Owner Daniel Neilsen
I am currently doing this as a temporary solution. It works but is gackable client side so I really need to change it.
function clientCmdKickBack(%force)
{
$mvPitchDownSpeed = %force/100;
schedule(50, %force, "FinishWeaponKick");
}
function FinishWeaponKick()
{
$mvPitchDownSpeed = 0;
}
Basically, I need to be able to make the server force the player to rotate upwards. I would prefer to do this in the engine but am not really sure where to start.
Can anyone help me out on this?