Game Development Community

AIPlayer::Chase in C++ Code

by Caleb · in Technical Issues · 06/26/2006 (3:43 pm) · 3 replies

I was trying to make an AIPlayer::Chase function in the aiplayer.cc file. I'm still getting ajusted to script so I figured C++ was the way to go (besides getting proximity every 1/100 of a secound needs to be fast).

But after running torque it couldn't find the function, So I cut and pasted the "setMoveDestination", Changed the name, put a definition in the aiplayer.h file and made a consel function just to see what would happen. However after all that it still doesn't work! I tried running the compiled version.....notin.

So what I realy need is someone who knows whats wrong to see if they can help me out (or at least make some suggestions).

P.S. would VectorDist(position, position) work in C++ Code?
Thanks.

#1
06/26/2006 (3:46 pm)
VectorDist(position, position) should give you a null vector right.. is that a typo?

it sounds like your trying to run a c++ function from the script?
each c++ function needs to be "exported" to the script before it is accesable.

locate in that class the ConsoleMethod code and other stuff.. basically give each function a quick glance.
#2
06/27/2006 (2:01 am)
@Caleb
As far as I'm aware source code publications are restricted to the private SDK forums.
#3
06/27/2006 (6:17 am)
Opps, sorry about that. I reposted in the private forum.