Author Topic: Kill Detection  (Read 581 times)

I need to make something where the server can detect when a player is killed, and the client whom killed the other player gets a message. How would I do this?


NOTE: Dont spoonfeed me. Please just break up the code and explain it thoroughly.

Your topics could have been put into just one, and this could also be learned using the search feature.

function GameConnection::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc)
   {
                //parent
       parent::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc);
                //Message here
        messageClient(%client,'',%msg);
   }

Your topics could have been put into just one, and this could also be learned using the search feature.

function GameConnection::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc)
   {
                //parent
       parent::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc);
                //Message here
        messageClient(%client,'',%msg);
   }


so my script would look like this?


Code: [Select]
function GameConnection::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc)
   {
                //parent
       parent::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc);
                //Message here
        messageClient(%client,'',%msg)('',"+10");
   }

« Last Edit: March 25, 2013, 07:07:40 PM by Aerodynamic »


It's pretty apparent you have no grasp of TorqueScript, I suggest tutorials before doing anything else.

function GameConnection::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc)
   {
                //parent
       parent::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc);
                //Message here
        messageClient(%client,'',"+10");
   }

It's pretty apparent you have no grasp of TorqueScript, I suggest tutorials before doing anything else.

function GameConnection::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc)
   {
                //parent
       parent::OnDeath(%client, %killerPlayer, %killer, %damageType, %damageLoc);
                //Message here
        messageClient(%client,'',"+10");
   }



Meh. Im currently trying to teach myself but some things are hard for me. Ive actually made about 5 private mods for a server coming up ([BNFB] SailorMan's D-Day TDM)



Meh. Im currently trying to teach myself but some things are hard for me. Ive actually made about 5 private mods for a server coming up ([BNFB] SailorMan's D-Day TDM)
There's 0 reason to teach yourself when we have so many resources and tutorials to help you.  Next time though, remember to use search first.

There's 0 reason to teach yourself when we have so many resources and tutorials to help you.  Next time though, remember to use search first.

Ok, and, I havent seen very many Blockland Tutorials but I guess I could watch/read the ones on GarageGames :/

Ok, and, I havent seen very many Blockland Tutorials but I guess I could watch/read the ones on GarageGames :/
Torquescript syntax is the same, and that's most of your issues right now

Torquescript syntax is the same, and that's most of your issues right now

Ty

Search for the message client command in the appendix: http://forum.blockland.us/index.php?topic=20754.0