Page 1 of 1

help about bind key

Posted: July 31st, 2013, 1:08 pm
by dhanielst
i want know if possible to make bindkey like hit esc key or arrow key for this

globals
trigger gg_trg_elidhan=null


function main
call InitTrig_elidhan1()

endglobals
function Trig_elidhan_Actions1 takes nothing returns nothing
call AdjustPlayerStateBJ( 50, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function InitTrig_elidhan1 takes nothing returns nothing
set gg_trg_elidhan = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(12), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(11), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(10), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(9), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(8), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(7), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(6), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(5), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(4), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(3), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(2), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(1), "-cl ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_elidhan, Player(0), "-cl ", true )
call TriggerAddAction( gg_trg_elidhan, function Trig_elidhan_Actions1 )
endfunction

Re: help about bind key

Posted: August 1st, 2013, 12:08 pm
by haxorico
Simply replace the playerchatevent with an arrow key event.
You can find the event in the jasscraft native list or in world editor make it in gui and convert it to jass to find the event.

Re: help about bind key

Posted: August 1st, 2013, 10:21 pm
by dhanielst
haxorico wrote:Simply replace the playerchatevent with an arrow key event.
You can find the event in the jasscraft native list or in world editor make it in gui and convert it to jass to find the event.



like this?

call TriggerRegisterPlayerChatEvent
( gg_trg_elidhan, Player(12), EVENT_PLAYER_ARROW_DOWN_DOWN, true )

Re: help about bind key

Posted: August 2nd, 2013, 3:25 am
by UndeadxAssassin
Remove the "Chat" and the boolean and it should be fine.

call TriggerRegisterPlayerEvent ( gg_trg_elidhan, Player(12), EVENT_PLAYER_ARROW_DOWN_DOWN )

Re: help about bind key

Posted: August 2nd, 2013, 5:02 am
by dhanielst
UndeadxAssassin wrote:Remove the "Chat" and the boolean and it should be fine.

call TriggerRegisterPlayerEvent ( gg_trg_elidhan, Player(12), EVENT_PLAYER_ARROW_DOWN_DOWN )


ok tnx

Re: help about bind key

Posted: August 2nd, 2013, 5:10 am
by dhanielst
one more question i use arrow key how to change it to esc, hold, stop, patrol key?

Edit: i already solve esc key