I tried to implement some autoaiming using this code:
But it does not work. See any mistakes?
------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
[This message has been edited by zagibu (edited September 26, 2002).]
Code:
potential = FirstThingInView(player, 100, 1, 0x404);
while(potential != -1)
{
if((HasLOS(player, potential)) && (potential != player) && (VectorDist(GetThingPos(player), GetThingPos(potential)) <= 1))
{
temp = VectorSub(GetThingPos(potential), GetThingPos(player));
autoaim = VectorSet(VectorZ(temp), VectorX(temp), 0);
FireProjectile(player, projectile, -1, 8, '0.0135 0.1624 0', autoaim, 1, 0x20, 0, 0);
}
potential = NextThingInView();
}But it does not work. See any mistakes?
------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
[This message has been edited by zagibu (edited September 26, 2002).]
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
![http://forums.massassi.net/html/smile.gif [http://forums.massassi.net/html/smile.gif]](http://forums.massassi.net/html/smile.gif)