Discussion Forums at Tactical Neuronics


Re: Moving into Line of Fire Logic From:
Robert Jessop

This is a modified line from SC III that I use to work out how far out of my line of fire the enemy is, but by replacing #cur_head with #enemy_h I've made it calculate how far I am from the enemy's line of file, with 0 being on it and + or - if I am left or right of it.

cmath va = (( #enemy_h = 1 )*(#x_pos-#enemy_x)+( #enemy_h = 2 )*(#y_pos-#enemy_y)+( #enemy_h = 3 )*(#enemy_x-#x_pos)+( #enemy_h = 4 )*(#enemy_y-#y_pos))

This message is a Reply to: Moving into Line of Fire Logic from Jason Hect

Replies to this message:
-None-


© 2001, John A. Reder.