I need some help with helmet view in warband, I am using HookieBT`s code here.
When I press "V" the inside of the helmets appear as it should, but I can do it without a helmet too which should not happen, also I have 2 different helmet view textures, but there is only 1 of them that shows up, help please.
Here is my the code with my stuff.
Module Meshes:
Module Mission_Templates:
It is set for all the Multiplayer Missions. Deathmatch, Battle. etc......
Module_Presentations:
Module_Scripts:
And how would I tie this feature to the 1st person key, so when you click "R" the helmet view activates.
When I press "V" the inside of the helmets appear as it should, but I can do it without a helmet too which should not happen, also I have 2 different helmet view textures, but there is only 1 of them that shows up, help please.
Here is my the code with my stuff.
Module Meshes:
插入代码块:
("nasal_view", 0, "nasal_view", 0, 0, 0, 0, 0, 0, 1, 1, 1),
("valsgaarde_view", 0, "valsgaarde_view", 0, 0, 0, 0, 0, 0, 1, 1, 1),
Module Mission_Templates:
It is set for all the Multiplayer Missions. Deathmatch, Battle. etc......
插入代码块:
common_helmet_view = (0, 0, 0, [
(key_clicked, key_v)
],
[
(get_player_agent_no, ":player_agent"),
(agent_is_alive, ":player_agent"),
(try_begin),
(le, "$helmet_view", 0), #incase this variable isn't set yet
(assign, "$helmet_view", 1),
(start_presentation, "prsnt_helmet_view"),
(else_try),
(assign, "$helmet_view", 0),
(try_end),
])
Module_Presentations:
插入代码块:
("helmet_view", prsntf_read_only, 0, [ #must use prsntf_read_only or you cannot attack
(ti_on_presentation_load,
[
(presentation_set_duration, 999999),
#(troop_get_inventory_slot,":item_id","trp_player",":slot_no"),
(troop_get_inventory_slot,":item_id","$g_player_troop", 4), #$g_player_troop is because custom commander is integrated, 4 = ek_head
(try_begin),
(eq, ":item_id", "itm_vikingr_helmet"),
(create_mesh_overlay, reg1, "mesh_nasal_view"),
(else_try),
(create_mesh_overlay, reg1, "mesh_valsgaarde_view"),
(try_end),
(position_set_x, pos1, 0),
(position_set_y, pos1, 0),
(overlay_set_position, reg1, pos1),
]),
(ti_on_presentation_run,
[
(try_begin),
(le, "$helmet_view", 0),
(presentation_set_duration, 0),
(try_end),
]),
]),
Module_Scripts:
插入代码块:
(else_try),
(this_or_next|eq, ":item_no", "itm_vikingr_helmet"),
(eq, ":item_no", "itm_VALSGARDE8"),
(eq, ":extra_text_id", 0),
(set_result_string, "@Press 'V' to enable Helmet View"),
(set_trigger_result, 0x00ff7f), #Green text
(try_end),
(try_end),
And how would I tie this feature to the 1st person key, so when you click "R" the helmet view activates.



