You are not logged in.
Pages: 1
Hey everybody! I just started modding SA using CLEO4 and Sanny Builder 3. 
But I don't get why my code isn't fully executed.
{$CLEO .cs}
03A4: name_thread "DEMO"
:LOLTEXT1
wait 0
if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @LOLTEXT1
0002: jump @LOLTEXT2
:LOLTEXT2
if
00E1: player 0 pressed_key 17
004D: jump_if_false @LOLTEXT3
00BA: show_text_styled GXT "BEEFY" time 1000 style 4
0002: jump @LOLTEXT1
:LOLTEXT3
if
00E1: player 0 pressed_key 18
004D: jump_if_false @LOLTEXT1
00BA: show_text_styled GXT "FEM_OK" time 2000 style 4
0002: jump @LOLTEXT1It does work if I press CTRL, but it doesn't show "OK" when I press ALT.
Can someone show me my mistake?
TIA Caelin
Offline

something wrong with Alt key (i don't know why it doesn't work). cause if you replace line 20 (pressed_key 18) for example by Shift key (pressed_key 16), your code work properly
update:
this opcode is not working correctly with Alt key (maybe with some other keys too)
00E1: player 0 pressed_key 18
but this works
0AB0: key_pressed 18
Last edited by bepsik (06-05-2015 19:16)
Offline

00E1 is used for predefined keys mapped in the main menu -> controls (such as sprint, jump, shoot, etc), whereas 0AB0 is used for keyboard buttons. If have no Alt button assigned to any action in the game menu, you cant use it with 00E1, but with 0AB0 it possible.
Read more info in the help file (F12).
Offline
Pages: 1