Hi, can someone give me pointers on how to do this properly. I haven't tried converting a bool to an integer before and am finding it difficult to find an example of doing this.
local whatdir; //direction of scrolling
function dir_on_transition( ttype, var, ttime)
{
if ( ttype == Transition.ToNewSelection)
{
if ( fe.get_input_state( "Up") == true) whatdir = "-1"
else if ( fe.get_input_state( "Up") == true) whatdir = "1"
}
print (whatdir) // debugging
}
fe.add_transition_callback( "dir_on_transition")
Thanks to Oomek for finding me a solution.
local whatdir = 0; //direction of scrolling
function dir_on_transition( ttype, var, ttime )
{
if ( ttype == Transition.ToNewSelection )
{
whatdir = -var
print ( whatdir ) //debugging
}
return false
}
fe.add_transition_callback( "dir_on_transition" )