Game Development Community

MvTriggerCounts logic

by Ivan Mandzhukov · in Torque Game Engine Advanced · 11/25/2007 (5:43 am) · 7 replies

Hey , advanced coders,
can someone of you give us information how these $mvTriggerCounts work in sense of the player movement? What is the logic they are based on? How the PLayer::updateMove understands that the "key" is pressed to apply movement to the player?

#1
11/25/2007 (7:00 am)
The keymap stuff is actually handling all input and calling functions accordingly. Those functions then set variables and the like that the move update function uses to calculate the "reaction".
#2
11/25/2007 (8:13 am)
In which files from the SDK are threse keymap stuff declared?
By now i think that incrementing "$mvTriggerCount2" with this statement"$mvTriggerCount2++" we actually set this trigger to "1". After setting it to "1" the Player::updateMove() is called , right? or this tigger calls other functions as well? May be my questions sounds odd for most of you , but i can't figure out where to start in the SDK my search about how the keybinding works and how transforms are applied to the player.
#3
11/25/2007 (8:37 am)
I don't know in which file from memory, but they are commonly used in scripting so you might want to start there and search for the appropriate class afterwards in the sources that represents the keymap in the engine.
#4
11/25/2007 (10:46 am)
Anyway it will be a big research :). I am not talking about the *.cs files. I want to make different movements like jumping and when i turn the arrow key to move a little while the player is still in the air. In the currently written player.cpp the movement is done in a way that the player cannot move while he has done a stand jump. he only moves in the air when jumping while running. I guess you got the sense. I've found so far the that the movement actions are calculated in updatemove and setpossition methids from the Player's class. But there will be something more to them , there are some arrays that catch the users inputs and then these calculatins start, but i can't find the logic in which these calculations are driven. In the TDN there are just few explanations about the player's physics. I need something more. If someone has found any link that will give more on the subject it will be good to share it,
Thanks in advance.
#5
11/25/2007 (10:50 am)
Are you looking for something like that?
#6
11/25/2007 (10:51 am)
Yes but the input handling is still done through the KeyMap which set values and call functions.

What you are looking at is the engine backend of it. That is nice for chaging the "what" it does internally. But not if you want to add key handlings and make them do something usefull.
Thats scriptside.
#7
11/25/2007 (11:39 am)
Stefan, good stuff

exactly what i was looking for. :)