QUOTE
...So basically you just have a location on each unit? If that's the case, it has been done many times before. The problem with that is you need a location for each unit around you, which wouldn't be good in most RPG's...
O gosh no!! and I actaully totally re did my system so it works way better now. The only problem it has is it doesnt center on the right spot everytime, it does most the time but not everytime. How it detects every death is like this:
1) First it does the intial check which moves the unit then gives it then moves it back.
2) then it detects whether that unit is still owned by the same player, if it is it sets a death counter.
3) then it checks if there is a unit at all (to see if it died before 2 could happen) if there is none it sets the death counter.(expirimental tho)
Those 3 triggers are repeated over and over. Its pretty simple in a way, here it is:
[attachmentid=22668]
Well after some mod research I found that it is impossible to detect it every time, so it will have to be random for the centering.