aiPlayer move list
by Ken Leong · in Torque Game Engine · 10/19/2002 (11:07 pm) · 4 replies
hi,
my question may sound amateur.. but please bare with me ;)
regarding the new aiPlayer class, what happens if I change the player::processTick(const Move* move)
can someone please shed some light over this topic?? I have no idea what's going on this moving thing..
regards..
my question may sound amateur.. but please bare with me ;)
regarding the new aiPlayer class, what happens if I change the player::processTick(const Move* move)
if (!move && getAIMove(&aiMove))
move = &aiMove;to if (getAIMove(&aiMove))
move = &aiMove;so that i can move the player object via mouseclick. The code compile with no problem, but when i ordered a move with mouseclick, the outcome is awful.. i figured that might be a problem where the above code might mess up the movelist.. but not sure though..can someone please shed some light over this topic?? I have no idea what's going on this moving thing..
regards..
About the author
#2
btw, I thought AIPlayer::setMoveDestination() wouldn't have effect unless given the client controlling object isn't the player object? If the client controlling object is the player object, the following code in player::processTick()
I'm trying to achieve the same effect like NWN where the player object can be order to move via mouseclick or keyboard.
regards.
10/21/2002 (7:48 pm)
great! I can't wait to see this resource in GG..btw, I thought AIPlayer::setMoveDestination() wouldn't have effect unless given the client controlling object isn't the player object? If the client controlling object is the player object, the following code in player::processTick()
if (!move && getAIMove(&aiMove))
move = &aiMove;will block the call to AIPlayer::getAIMove(), am I right?I'm trying to achieve the same effect like NWN where the player object can be order to move via mouseclick or keyboard.
regards.
#3
One quick way to tell if you are controling the player or not is the movement keys, if the stock (w,s,a and d) keys move your player then your controling the player ;)
-Ron
10/22/2002 (4:57 am)
you are correct, the controling object needs to be the camera _NOT_ the player. One quick way to tell if you are controling the player or not is the movement keys, if the stock (w,s,a and d) keys move your player then your controling the player ;)
-Ron
#4
I'm not sure have you noticed this or not, but in NWN, the player object can be controlled either using mouseclick or the stock key(w,s,a,d).. and that is what i'm trying to achieve here... how do i go about to do this??
if i force AIPlayer::getAIMove() in player::processTick(), the player seems to "dance" around and the outcome is awful.. :(
regards.
10/22/2002 (9:47 pm)
haha.. at least i got that right :)I'm not sure have you noticed this or not, but in NWN, the player object can be controlled either using mouseclick or the stock key(w,s,a,d).. and that is what i'm trying to achieve here... how do i go about to do this??
if i force AIPlayer::getAIMove() in player::processTick(), the player seems to "dance" around and the outcome is awful.. :(
regards.
Associate Ron Yacketta
This is how I am doing it in my "mouse controled player movement" code that I will be releasing as a resource as soon as I get off my lazy arse and add 3 new camera states.
-Ron