Napisano dnia: 2010-11-22 18:04:21
Chciałem przerobić swoją misję w scm na strukture typowo R*
Według szablonu dodałem po nazwie thread
Problem się pojawia po:
Gra łapie crasha i nie wiem dlaczego. Przez chwile jestem wstanie zobaczyć zarys gracza, a po czym crash.
Według szablonu dodałem po nazwie thread
Kod:
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Mission_Failed
end
0050: gosub @Mission_Cleanup
end_thread
:Mission_Start
$ONMISSION = 1
...
(Tutaj wszystko jest ok, na początku wczytuje dane modele, wymagane rzeczy i wykonuje kod polegający na ruchu pojazdu z kamerą. Na końcu czeka 5000ms i przechodzi do procedury :PLAYER1)
...
0460: set_camera_transverse_delay 0 time 4000
wait 5000
:PLAYER1
fade 0 1000
wait 1000
fade 1 1000
00AB: put_car $VCAR at 2762.88 -2595.3 0.0
0826: enable_hud 1
0581: enable_radar 1
02EB: restore_camera_with_jumpcut
0373: set_camera_directly_behind_player
00A1: put_actor $PLAYER_ACTOR at -1615.13 -129.59 15.13
01B4: set_player $PLAYER_CHAR can_move 1
09BA: show_entered_zone_name 1
return // tutaj się kończy Mission_Start
:CHECK
wait 0
if
00EC: actor $PLAYER_ACTOR 0 near_point -1716.54 -295.975 radius 10.0 10.0
jf @check
gosub @Mission_Passed
return
:Mission_Cleanup
$ONMISSION = 0
01C2: remove_references_to_actor $ASTAY1
009B: destroy_actor $ASTAY2
0AAD: set_audiostream 0@ perform_action 0
0AAE: release_audiostream 0@
00D8: mission_cleanup
return
:Mission_Failed
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
return
:Mission_Passed
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 5000
0394: play_music 1
return
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Mission_Failed
end
0050: gosub @Mission_Cleanup
end_thread
:Mission_Start
$ONMISSION = 1
...
(Tutaj wszystko jest ok, na początku wczytuje dane modele, wymagane rzeczy i wykonuje kod polegający na ruchu pojazdu z kamerą. Na końcu czeka 5000ms i przechodzi do procedury :PLAYER1)
...
0460: set_camera_transverse_delay 0 time 4000
wait 5000
:PLAYER1
fade 0 1000
wait 1000
fade 1 1000
00AB: put_car $VCAR at 2762.88 -2595.3 0.0
0826: enable_hud 1
0581: enable_radar 1
02EB: restore_camera_with_jumpcut
0373: set_camera_directly_behind_player
00A1: put_actor $PLAYER_ACTOR at -1615.13 -129.59 15.13
01B4: set_player $PLAYER_CHAR can_move 1
09BA: show_entered_zone_name 1
return // tutaj się kończy Mission_Start
:CHECK
wait 0
if
00EC: actor $PLAYER_ACTOR 0 near_point -1716.54 -295.975 radius 10.0 10.0
jf @check
gosub @Mission_Passed
return
:Mission_Cleanup
$ONMISSION = 0
01C2: remove_references_to_actor $ASTAY1
009B: destroy_actor $ASTAY2
0AAD: set_audiostream 0@ perform_action 0
0AAE: release_audiostream 0@
00D8: mission_cleanup
return
:Mission_Failed
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
return
:Mission_Passed
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 5000
0394: play_music 1
return
Problem się pojawia po:
Kod:
:PLAYER1
fade 0 1000
wait 1000
fade 1 1000
fade 0 1000
wait 1000
fade 1 1000
Gra łapie crasha i nie wiem dlaczego. Przez chwile jestem wstanie zobaczyć zarys gracza, a po czym crash.