Game Development Community

How to remove speed slowing

by Viktor Kuropyatnik · in Torque Game Engine · 04/11/2005 (4:01 am) · 11 replies

For moving bots I use setMoveDestination() and Tasks.
Bots normaly move from one point to another but they slowing before reaching point and than stop and than run to next point (I think slowing was made for more natural look), I need to remove this "slowing SFX" - How I can do this by script or by modifing engine?

So I moved here.

#1
04/11/2005 (4:16 am)
Have you tried reading through the aiPlayer code?
#2
04/11/2005 (4:29 am)
Not yet. I dont want to change engine if it possible. But if it's only way I will.
#3
04/11/2005 (10:52 am)
Changing the engine is a good thing. :) Don't worry about tweaking something if it helps your project get further along.
#4
04/11/2005 (10:57 am)
Viktor,

Your answer is in the engine and it is already there:

ConsoleMethod( AIPlayer, setMoveDestination, void, 3, 4, "(Point3F goal, bool slowDown=true)"
"Tells the AI to move to the location provided.")

Unless you pass a "false" it defaults to slowdown.

HIH
#5
04/12/2005 (5:54 am)
In aiPlayer.cc, in the constructor the bool mMoveSlowdown is set to true. I don't think it is currently accessible from anywhere else, but you could add that as a new method to the class. If you only need to stop from happening and dont need to choose, just set it to false and you are done.
#6
04/12/2005 (9:39 am)
Ben
No I dont need to choose. So I think changing
ConsoleMethod( AIPlayer, setMoveDestination, void, 3, 4, "(Point3F goal, bool slowDown= false )"
will be simliest way. Or change constructor.

But maybe I can run script like this:

bot.setMoveDestination("whereToMove", false);
#7
04/12/2005 (9:57 am)
Viktor,

That is exactly what you do (I use that command).

Thanks.
#8
04/12/2005 (10:09 am)
Cool ! All works, just add "false" parameter and thats all.
#9
04/12/2005 (10:18 am)
I think Ben's point was to get you involved in reading the code so that YOU can find the answers.
#10
04/12/2005 (11:11 pm)
Anthony is correct. ;)

Anyway, I'm glad you found a solution. Thanks, Derk.
#11
04/13/2005 (12:23 am)
Thanks for help! I readed code yesterday and found solution for another problem :)