I have some pseudo code:
Trigger.prototype.RipostCheck = function(data)
{
// Now every time some entity changes ownership, this function gets called
// and you'll get an JS object 'data' with some variables inside, with the following lay-out:
// {
// "entity": entityId,
// "from": playerId,
// "to": playerId
// }
// What you need to do is to check whether the right entity is in the event, like this:
if(data.entity == 483) && (data.from == 2) && (data.to == 1) {
// do something
}
};
cmpTrigger.RegisterTrigger("OnOwnershipChanged", "RipostChec