Game Development Community

MsToNext

by Howard Dortch · in Torque Game Engine · 08/06/2004 (8:04 am) · 6 replies

I wanted a bot to run to a node on a path and hang out there for a bit. I played with this msToNext thinking that would get the delay but it doesn't seem to do anything. Someone tell me how to use this?

#1
08/06/2004 (9:39 am)
If you're using the default AIPlayer code, there's a trigger for OnReachDestination. This gets called when the bot reaches a node. The script code then points the bot at the next node and the whole process repeats. So you could add a dynamic field in the mission editor at that node called "PauseTime". Now, in the script code, when OnReachDestination is called, instead of call bot.setMoveDestination you would callschedule(PauseTime, moveBotToNext); The moveBotToNext block would then call setMoveDestination.

(I'm doing this from memory at work, so I don't have all of the script details in front of me.)
#2
08/08/2004 (6:48 am)
Yeah I was going to do that but noticed the msToNext in there and didn't want to duplicate efforts if that was intended to do the delay. Any clue what that value is for?
#3
08/08/2004 (7:27 am)
Looking through the code, it appears msToNext is used only in the context of pathed interiors, ie how long it takes for the train to move between points. I don't see any reference at all to anything else that may use path markers. Brian's idea sounds like the most viable.
#4
08/11/2004 (8:36 pm)
You can always "abuse" msToNext to store the value. :)
#5
08/12/2004 (3:33 am)
So it appears the msToNext is a left over? I can use it for what ever suits me?

Pathed interior? A house that moves is a trailer!
#6
08/12/2004 (8:20 am)
MsToNext is also used by the pathed camera, I believe.

Well, it's a field. Just use it to store the data that fits its semantics - ie, milliseconds to next field.