Yeah right now I have nuclear glory and it works great and i'm using it for my bullet hitting stuff. i set up a raycast with it and made it so that it casts a ray 10 units ahead of it and if it intersects something, the bullet hides and the object takes damage. but something's not working and i don't know what it is. if you know what i did wrong, or you have a better way to do this entirely, please tell me.
here is my code:
for b = 1 to 9
bullet= bullet(attacker,b)
sx# = object position x(bullet)
sy# = object position y(bullet)
sz# = object position z(bullet)
ex# = newxvalue(sx#, object angle y(bullet), 10)
ey# = newyvalue(sy#, object angle x(bullet), 10)
ez# = newzvalue(sz#, object angle x(bullet), 10)
rhit = RayIntersectTypePro(PLAYER_OBJ, TYPE_NGC_MESH, sx#, sy#, sz#, ex#, ey#, ez#)
if rhit = 1
bullet(attacker, b, 1) = 0
hitobj = RayHitObjPRO()
unithealth(hitobj)=unithealth(hitobj)-damage
endif
if unithealth(hitobj)<=0 then hide object hitobj
next b
the bullet array is for the rapid fire system of my rts, so the first thing in the array is the unit, the second is the bullet number (each unit has 9 bullets to fire) and the third is the life of the bullet. please help.
Your Head A-Splode