I'm working on the families and I want to get some confirmation on third events I made, as the only way I can see them being possible is heavy in jerry-rigging.
basically how it works currently is (units is the family)
first event:click on the attacker and it gathers the power and accuracy information as well as x and y position. as well as sets its pv "active" to 1
second:click on the target takes the information from him and calculates damage and hit chance. and sets the "ready" global value to 1.
third:constantly check's if there's a unit with active to 1 and the ready global value is 1. once both are 1 it sets the attacker unit's angle and fires the shot.
This seems highly inefficient and I suspect there's an easier way.
If not there should be, Like sprite variables/groups or something. something that you can identify a specific sprite for further reference without having to constantly reference it with some random variable.
Something like:
first event:click on the attacker and it gathers the power and accuracy information as well as x and y position. as well as sets its pv "active" to 1. Identify the attacker.
second:click on the target takes the information from him and calculates damage and hit chance. and sets the "ready" global value to 1. sets the attacker unit's angle and fires the shot.
thanks for the help.