Who Killed Who When?
by Swaroop Reddy · in RTS Starter Kit · 11/27/2007 (6:53 am) · 3 replies
I need to know the following
- whenever a unit is killed how do I know?
- who was the unit that delivered the final blow when a unit is killed!?
It will help me to give credit to the client with the kill and do some checks for game win / loss conditions etc.? .
The stats that come with the kit are just random numbers that are generated in gameConnection.cs and the are not modified in game.
- whenever a unit is killed how do I know?
- who was the unit that delivered the final blow when a unit is killed!?
It will help me to give credit to the client with the kill and do some checks for game win / loss conditions etc.? .
The stats that come with the kit are just random numbers that are generated in gameConnection.cs and the are not modified in game.
About the author
#2
%unitA.attackingTo = %unitB;
%unitB.beeingAttackedBy = %unitA;
In a way that the last attack be registered by this fields.
11/27/2007 (11:06 am)
I dont remember now if the engine has already something for this, but in any case a simple solution could be to add two dinamic fields in the units. Something like:%unitA.attackingTo = %unitB;
%unitB.beeingAttackedBy = %unitA;
In a way that the last attack be registered by this fields.
#3
11/28/2007 (5:11 pm)
That is kind of what I did and it is working. Thanks.
Torque Owner Swaroop Reddy
So how do I know who is attaking the object that is about to be removed?