OSP Code Combat Perfectly Smooth, Mouse-Enabled Deathcam V1.4

Users who are viewing this thread

Well, you have two scripts affecting in some way the camera, so there is a high chance that they are conflicting with each other in some way ^^
Yes, I already solved it and I was able to make the two scripts work fine together. I already tried it and everything is fine.
What I did was the following:
I took the code from custom_commander_camera and put it inside one of the death_camera codes, I called common_start_deathcam, inside a try block, before the line (main_hero_fallen) and at the end of the code I added the condition if the player dies, the code is deactivated. Remaining as follows:
Code:
common_start_deathcam = (
    0, 1, ti_once, #1 second delay before the camera activates
    [
    ######## inicio custom_commander_camera rubik #############
    (try_begin),
      (get_player_agent_no, ":player_agent"),
      (agent_get_look_position, pos1, ":player_agent"),
      (position_move_z, pos1, "$g_camera_z"),
      (position_move_y, pos1, "$g_camera_y"),
      (agent_get_horse, ":horse_agent", ":player_agent"),
      (try_begin),
        (ge, ":horse_agent", 0),
        (position_move_z, pos1, 80),
      (try_end),
      (mission_cam_set_position, pos1),
      (try_begin),
        (key_is_down, key_left_control),
        (assign, ":move_val", 50),
      (else_try),
        (assign, ":move_val", 10),
      (try_end),
      (try_begin),
        (key_clicked, key_up),
        (mission_cam_set_mode, 1),
        (val_add, "$g_camera_z", ":move_val"),
      (else_try),
        (key_clicked, key_down),
        (mission_cam_set_mode, 1),
        (val_sub, "$g_camera_z", ":move_val"),
      (else_try),
        (key_clicked, key_left),
        (mission_cam_set_mode, 1),
        (val_add, "$g_camera_y", ":move_val"),
      (else_try),
        (key_clicked, key_right),
        (mission_cam_set_mode, 1),
        (val_sub, "$g_camera_y", ":move_val"),
      (try_end),
      (try_begin),
        (this_or_next|game_key_clicked, gk_view_char),
        (this_or_next|game_key_clicked, gk_zoom),
        (game_key_clicked, gk_cam_toggle),
        (mission_cam_set_mode, 0),
      (try_begin),
        (main_hero_fallen),
        (mission_cam_set_mode, 0),
        (try_end),
      (try_end),
      (try_end),
      ######## fin custom_commander_camera rubik #############
    
        (main_hero_fallen),
        (eq, "$deathcam_on", 0),
    ],
    [
        (set_fixed_point_multiplier, 10000),.....
        ......

I do not know if there are things that do not work, but that way it compiled me well, without errors and it worked for me in a new and saved game.
 
Back
Top Bottom