[HELP] Create Reload System for automatic guns

Users who are viewing this thread

Chuck Boris

Recruit
Hi all,
I'm working on WWII Europe mod for fun. I'm using the automatic gun script from Bear Force II (Thanks to DanyELE)
So i have one BIG problem. In this mod, the weapons never reload. So i must to CREATE reloading system for automatic gun but it's so hard difficult for me.
I can show you how i made it (no laught plz !!! it's my first code :razz:)

Mission Template:
sw_reload_system = (0, 0, 0, [],
[
(multiplayer_get_my_player, ":my_player"),
    (player_is_active,":my_player"),
    (neg|player_is_busy_with_menus, ":my_player"),
(player_get_agent_id, ":my_agent", ":my_player"),
(agent_is_active,":my_agent"),
(agent_is_alive, ":my_agent"),
(store_mission_timer_a_msec, ":time"),
    (try_begin),
  (game_key_clicked, key_q),
          (agent_get_ammo, ":cur_ammo", ":player_agent"),
  (ge, ":item", 0),
          (agent_refill_ammo, ":player_agent"),
(try_end),
#        (try_begin),
#          (get_player_agent_no, ":player_agent"),
#          (agent_get_ammo, ":cur_ammo", ":player_agent"),
#          (le, ":cur_ammo", 0),
#          (agent_refill_ammo, ":player_agent"),
#          (tutorial_message, "str_tutorial_ammo_refilled"),
#        (try_end),
])

Script:
#reload system
(multiplayer_get_my_player, ":my_player"),
    (player_is_active,":my_player"),
    (neg|player_is_busy_with_menus, ":my_player"),
(player_get_agent_id, ":my_agent", ":my_player"),
(agent_is_active,":my_agent"),
(agent_is_alive, ":my_agent"),
(store_mission_timer_a_msec, ":time"),
    (try_begin),
  (game_key_clicked, key_q),
          (agent_get_ammo, ":cur_ammo", ":my_agent"),
  (ge, ":item", 0),
          (agent_refill_ammo, ":my_agent"),
(try_end),
#        (try_begin),
#          (get_player_agent_no, ":player_agent"),
#          (agent_get_ammo, ":cur_ammo", ":player_agent"),
#          (le, ":cur_ammo", 0),
#          (agent_refill_ammo, ":player_agent"),
#          (tutorial_message, "str_tutorial_ammo_refilled"),
#        (try_end),

The BATCH file check and he's no find any problem, but no effect in game....
What's problem?
Someone can take SOOOOOOME times to explain how the scripts in Warband are running? (The guids are no really clear for me)

Please help!!! it's the last part to finish the "coding" part on my mod
 
Back
Top Bottom