I've a big problem ; here's the code:
| CODE |
015D: set_gamespeed 0.3 01B8: set_player $PLAYER_CHAR armed_weapon_to 0 01B4: set_player $PLAYER_CHAR control 0 052C: set_player $PLAYER_CHAR drunk_visuals 255 0581: toggle_radar 0 043C: set_game_sounds_fade 1 016A: fade 0 1000 ms 0001: wait 1200 ms 015D: set_gamespeed 1.0 0001: wait 0 ms 052C: set_player $PLAYER_CHAR drunk_visuals 20 01B4: set_player $PLAYER_CHAR control 1 01B8: set_player $PLAYER_CHAR armed_weapon_to 0 0050: gosub @SUBBARCA 0001: wait 0 ms 016A: fade 1 900 ms 0001: wait 300 ms 02EB: restore_camera_with_jumpcut 0001: wait 2500 ms 052C: set_player $PLAYER_CHAR drunk_visuals 10 0001: wait 1500 ms 052C: set_player $PLAYER_CHAR drunk_visuals 0 0581: toggle_radar 1 0051: return |
Here's the gosub SUBBARCA:
| CODE |
:SUBBARCA 0001: wait 0 ms 04E4: unknown_refresh_game_renderer_at 38.5723 -1710.7312 6.0456 0247: request_model #TROPIC
:SUBBARCA2 0001: wait 0 ms 00D6: if 8248: not model #TROPIC available 004D: jump_if_false @SUBBARCA2
00A5: 9@ = create_car #TROPIC 38.5723 -1710.7312 6.0456 0175: set_car 9@ z_angle_to 250.0 0369: put_player $PLAYER_CHAR in_car 9@ 02DB: set_boat 9@ speed_to 50.0 01C3: remove_references_to_car 9@ 0249: release_model #TROPIC 010D: set_player $PLAYER_CHAR wanted_level_to 2 01B6: set_weather 2 0051: return |
The problem,seem, very silly: when I launch the code,all run correctly: the screen fade off and ok. But then,at black screen,when game engine run SUBBARCA2 sub,the game crash after a while.
The problem is for sure the sub SUBBARCA,because if I delete it from the code all work correctly.
Someone has an explain?
What I do wrong?