[Ders]Savaş Kazanıldığında Karakterin Otomatik Sevinmesi

Users who are viewing this thread

Herkse Selamlar. Forumda Dolaşırken Yararlı Bir Kod Gördüm ve Benim Uzun Zamandır Moduma Eklemek İstediğim Bir Koddu.
Bu Kod Savaş Bitince Karakterinizin Otomatik Olarak Sevinmesini Sağlıyor.​

Kod:sad:module_mission_templates)İlk Önce mission_templates de şu kodları bulalım :
Code:
common_siege_rotate_belfry = (
  0, 2, ti_once,
  [
    (call_script, "script_cf_siege_rotate_belfry_platform"),
    ],
  [
    (assign, "$belfry_positioned", 3),
    ])

Kod:sad:module_mission_templates)Daha Sonra Alttaki Kodları Yukarıdaki Kodun Aşşağısına Ekleyelim :
Code:
animation_victoire = ( 0, 0, 2,
        [
           (all_enemies_defeated, 5),          
        ],
        [
           (get_player_agent_no, ":player"),
           (agent_is_alive, ":player"),
           (agent_set_animation, ":player", "anim_cheer", 1),
           (try_begin),
              (eq, "$character_gender", tf_female),
              (agent_play_sound, ":player", "snd_woman_yell"),
           (else_try),
              (agent_play_sound, ":player", "snd_man_victory"),
           (try_end),
        ])

Şöyle Gözükmesi Gerekir:
Code:
common_siege_rotate_belfry = (
  0, 2, ti_once,
  [
    (call_script, "script_cf_siege_rotate_belfry_platform"),
    ],
  [
    (assign, "$belfry_positioned", 3),
    ])

animation_victoire = ( 0, 0, 2,
        [
           (all_enemies_defeated, 5),          
        ],
        [
           (get_player_agent_no, ":player"),
           (agent_is_alive, ":player"),
           (agent_set_animation, ":player", "anim_cheer", 1),
           (try_begin),
              (eq, "$character_gender", tf_female),
              (agent_play_sound, ":player", "snd_woman_yell"),
           (else_try),
              (agent_play_sound, ":player", "snd_man_victory"),
           (try_end),
        ])

common_siege_assign_men_to_belfry = (
  0, 0, ti_once,
  [
    (call_script, "script_cf_siege_assign_men_to_belfry"),
    ], [])

Daha Sonra Kodun Çalışabilmesi İçin mission_templateste şu Kodu Aratıp Bulalım:
Code:
lead_charge

Daha Sonra Biraz Aşşağı İnip Şu Kodu Bulalım :
Code:
common_battle_init_banner,

Ve Bu Kodun Altına Şu Kodu Ekleyelim :
Code:
animation_victoire,

Bu Kodları Kullanmak İçin Aşşağıdaki Kişilere Teşekkür Edebilrisiniz:

kozure okami
Dj_FRedy
KelNaru

Orijinal Konu: https://forums.taleworlds.com/index.php/topic,361261.0.html​
 
Back
Top Bottom