Napisano dnia: 2010-12-26 02:19:36
No więc tak. Na mapie ustawiłem sobie checkpointa i po wejściu do nie go pojawia się menu z kilkoma pojazdami do wyboru. Gdy się wciśnie klawisz G(klawisze rezygnacji) menu znika. Następnie gdy postać oddali się od tego miejsca gdzie jest ustawiony checkpoint na kilka metrów checkpoint pojawia się ponownie. Do tego momentu ten cały skrypt hula jak ta lala. Ale jak już ma się wcisnąć klawisz wyboru żeby wybrać wybrany pojazd to gra mi się zawiesza. Po niżej fragment kodu:
Co ciekawe jak robiłem takie menu że jak się wciśnie jakiś klawisz podczas normalnego chodzenia to menu działa bez problemu. A tu po dodaniu jednego głupiego kółka nie chce działać i nie wiem dlaczego. Może ktoś inny wie co jest nie tak?
Kod:
:start_1
03BC: 0@ = create_sphere_at 2505.7434 -1711.3347 13.5275 radius 1.0
:a1
wait 0
if
00ED: actor $PLAYER_ACTOR 0 near_point 2505.7434 -1711.3347 radius 0.5 0.5 on_foot
jf @a1
Player.CanMove($PLAYER_CHAR) = False
fade 0 1500
wait 1500
03BD: destroy_sphere 0@
00A1: put_actor $PLAYER_ACTOR at 2505.7434 -1711.3347 13.5275
Actor.Angle($PLAYER_ACTOR) = 180.0
08D4: $panel = create_panel_with_title 'TXT1' position 29.0 30.0 width 200.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $panel column 0 header 'DUMMY' data 'TXT6' 'TXT7' 'TXT8' 'TXT9' 'TXT10' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
02EB: restore_camera_with_jumpcut
wait 1500
fade 1 1500
//=============
:czekaj_na_wybor
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 8 //G
jf @czekaj_na_wybor_test2
08DA: remove_panel $Panel
Player.CanMove($PLAYER_CHAR) = True
//------------
:a2
wait 0
if
80ED: not actor $PLAYER_ACTOR 0 near_point 2505.7434 -1711.3347 radius 2.5 2.5 on_foot
jf @a2
jump @start_1
//------------
//od tad zle
:czekaj_na_wybor_test2
if
00E1: player $PLAYER_CHAR pressed_key 16 //spacja
jf @czekaj_na_wybor
:wyjdz
08D7: $Wybrane = panel $Panel active_row
08DA: remove_panel $Panel
0871: init_jump_table $Wybrane total_jumps 4 1 @wyjdz jumps 0 @wybrane1 1 @wybrane2 2 @wybrane3 3 @wybrane4 0 -1 0 -1 0 -1
:wybrane1
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#cabbie, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
:wybrane2
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#admiral, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
:wybrane3
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#solair, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
:wybrane4
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#glendale, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
03BC: 0@ = create_sphere_at 2505.7434 -1711.3347 13.5275 radius 1.0
:a1
wait 0
if
00ED: actor $PLAYER_ACTOR 0 near_point 2505.7434 -1711.3347 radius 0.5 0.5 on_foot
jf @a1
Player.CanMove($PLAYER_CHAR) = False
fade 0 1500
wait 1500
03BD: destroy_sphere 0@
00A1: put_actor $PLAYER_ACTOR at 2505.7434 -1711.3347 13.5275
Actor.Angle($PLAYER_ACTOR) = 180.0
08D4: $panel = create_panel_with_title 'TXT1' position 29.0 30.0 width 200.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $panel column 0 header 'DUMMY' data 'TXT6' 'TXT7' 'TXT8' 'TXT9' 'TXT10' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
02EB: restore_camera_with_jumpcut
wait 1500
fade 1 1500
//=============
:czekaj_na_wybor
wait 0
if
00E1: player $PLAYER_CHAR pressed_key 8 //G
jf @czekaj_na_wybor_test2
08DA: remove_panel $Panel
Player.CanMove($PLAYER_CHAR) = True
//------------
:a2
wait 0
if
80ED: not actor $PLAYER_ACTOR 0 near_point 2505.7434 -1711.3347 radius 2.5 2.5 on_foot
jf @a2
jump @start_1
//------------
//od tad zle
:czekaj_na_wybor_test2
if
00E1: player $PLAYER_CHAR pressed_key 16 //spacja
jf @czekaj_na_wybor
:wyjdz
08D7: $Wybrane = panel $Panel active_row
08DA: remove_panel $Panel
0871: init_jump_table $Wybrane total_jumps 4 1 @wyjdz jumps 0 @wybrane1 1 @wybrane2 2 @wybrane3 3 @wybrane4 0 -1 0 -1 0 -1
:wybrane1
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#cabbie, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
:wybrane2
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#admiral, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
:wybrane3
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#solair, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
:wybrane4
Player.CanMove($PLAYER_CHAR) = True
1@ = Car.Create(#glendale, 2521.4954, -1710.4253, 13.5009)
072A: put_actor $PLAYER_ACTOR into_car 1@ driverseat
jump @wyjdz
Co ciekawe jak robiłem takie menu że jak się wciśnie jakiś klawisz podczas normalnego chodzenia to menu działa bez problemu. A tu po dodaniu jednego głupiego kółka nie chce działać i nie wiem dlaczego. Może ktoś inny wie co jest nie tak?