Using magnitude with tons of different actors?
vegasmitch@hotmail.com
Member Posts: 3
in Tech Support
So I know how to use magnitude to determine the distance between two actors. But I am making a game kind of like a simplified "Colony" (you can find it on Armor Games) where you spawn actors and another person spawns actors. When two actors that are enemies see each other, they need to stop and start shooting, when one is dead, the other keeps moving until it gets within range of another enemy actor, and so on. So I was wondering how I could use magnitude in this situation, so that it applies to multiple different/same actors all in the same scene.
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
then some how try and call on those attributes as the magnitude but i think you will also have to name each unit separately as to know what unit is close to what other unit
ill see if i can come up with something
your thinking of a little more command and conquer style am i right
You could add an actor to each character, make it invisible, and have it begin to track x,y when other actors overlap or collide with it.
those x,y values can then be used in determining Magnitude, without having to track it the whole time.