actors (A), (B) question please help
nCartoon
Member, PRO Posts: 54
I have a question
I have 2 actors (A), (B) how can I write a code to be like this
- if actor (A) heading to actor (B) "Opposite direction" at 400 Speed
then actor (B) destroy
-if actor (A) and (B) are moving "same direction" but (A) is 400 Speeder
then actor (B) destroy
-if actor (A) heading to actor (B) "actor (B) is not moving" at 400 Speed
then actor (B) destroy
I have 2 actors (A), (B) how can I write a code to be like this
- if actor (A) heading to actor (B) "Opposite direction" at 400 Speed
then actor (B) destroy
-if actor (A) and (B) are moving "same direction" but (A) is 400 Speeder
then actor (B) destroy
-if actor (A) heading to actor (B) "actor (B) is not moving" at 400 Speed
then actor (B) destroy
Comments
That is the basic structure of what you will need to do. Hope this helps!
~Josh
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I have one actor (A)
if actor (A) going to right then true or false etc.....
Is there direction determines of an actor ?
2 is left. 1 is right.
Hope that helps
~Josh
again thank you guys
Doesn't aTan(y/x) do exactly the same as vectorToAngle(x,y)
I've tested both and the aTan works a little better for me, with more consistent results.
Yeah, but VectorToAngle sounds cooler, it's got the word 'Vector' in for god's sake, it sounds like a 1970's sci-fi robot or something.
The Professor (watching from his helicopter as 'Vector' destroys NewYork): "Oh my god, you fools, you've given it eyes, I told you not to give it eyes"