WB Coding Presentation's slider not working

Users who are viewing this thread

Hello, I have a problem with my presentation, I create a range of image_buttons but only 3 of them are working and like the title say my presentation's slide is not working.
Python:
("inventory", prsntf_manual_end_only, 0, [

    (ti_on_presentation_load, [
        (set_fixed_point_multiplier, 1000),

        (create_mesh_overlay, reg0, "mesh_mp_inventory"),
        (position_set_x, pos1, 50),
        (position_set_y, pos1, 100),
        (overlay_set_position, reg0, pos1),
        (position_set_x, pos1, 300),
        (position_set_y, pos1, 750),
        (overlay_set_size, reg0, pos1),

        (create_text_overlay, ":over", "str_empty_string", tf_scrollable_style_2),
        (position_set_x, pos1, 100),
        (position_set_y, pos1, 100),
        (overlay_set_position, ":over", pos1),
        (position_set_x, pos1, 200),
        (position_set_y, pos1, 500),
        (overlay_set_area_size, ":over", pos1),
        (set_container_overlay, ":over"),

        (assign, ":cur_x", 0),
        (assign, ":cur_y", 0),

        (try_for_range, reg0, 0, 33),#WIP
            (create_image_button_overlay, reg0, "mesh_inv_slot", "mesh_inv_slot"),
            (position_set_x, pos1, ":cur_x"),
            (position_set_y, pos1, ":cur_y"),
            (overlay_set_position, reg0, pos1),
            (position_set_x, pos1, 500),
            (position_set_y, pos1, 550),
            (overlay_set_size, reg0, pos1),

        (try_begin),
            (neq, ":cur_x", 100),
            (val_add, ":cur_x", 50),

        (else_try),
            (val_sub, ":cur_x", 100),
            (val_sub, ":cur_y", 55),
            (try_end),
        (try_end),

        (presentation_set_duration, 999999),
    ]),

    (ti_on_presentation_run, [
        (store_trigger_param_1, ":cur_time"),
        (try_begin),
            (this_or_next|key_clicked, key_escape),
            (key_clicked, key_xbox_start),
            (gt, ":cur_time", 200),
            (presentation_set_duration, 0),
        (try_end),
    ]),
]),
Python:
("mp_inventory", 0, "mp_inventory_window", 0, 0, 0, 0, 0, 0, 1, 1, 1),

Thanks for your help.
 
Solution
I've found the problem, in fact you should avoid to use negative positions with containers.
I've changed (assign, ":cur_y", 0), with (assign, ":cur_y", 1500), because in my loop everytime 3 cases are created, :cur_y is subdivide by 55 so it's a negative value.
Now everything is working correctly.

Hope it can help.
I've found the problem, in fact you should avoid to use negative positions with containers.
I've changed (assign, ":cur_y", 0), with (assign, ":cur_y", 1500), because in my loop everytime 3 cases are created, :cur_y is subdivide by 55 so it's a negative value.
Now everything is working correctly.

Hope it can help.
 
Upvote 0
Solution
Top Bottom