Hi, how can I make a NPC use a specific animation when they are located in a specific place? For example, a companion who would appear elsewhere than in tavern but would have a different animation at that moment/place. I have tried to do something similar to this from module_scripts.py:
It then seems to be related to module_mission_templates.py, but I don't know what to do over there..
Code:
("init_town_agent",
[
(store_script_param, ":agent_no", 1),
(agent_get_troop_id, ":troop_no", ":agent_no"),
(set_fixed_point_multiplier, 100),
(assign, ":stand_animation", -1),
(try_begin),
(this_or_next|is_between, ":troop_no", armor_merchants_begin, armor_merchants_end),
(is_between, ":troop_no", weapon_merchants_begin, weapon_merchants_end),
(try_begin),
(troop_get_type, ":cur_troop_gender", ":troop_no"),
(eq, ":cur_troop_gender", 0),
(agent_set_animation, ":agent_no", "anim_stand_townguard"),
(else_try),
(agent_set_animation, ":agent_no", "anim_stand_townguard"),
(end_try),
(else_try),
(is_between, ":troop_no", kingdom_ladies_begin, kingdom_ladies_end),
(assign, ":stand_animation", "anim_stand_lady"),
(else_try),
(is_between, ":troop_no", active_npcs_begin, active_npcs_end),
(assign, ":stand_animation", "anim_stand_lord"),
(else_try),
(is_between, ":troop_no", soldiers_begin, soldiers_end),
(assign, ":stand_animation", "anim_stand_townguard"),
(try_end),
(try_begin),
(ge, ":stand_animation", 0),
(agent_set_stand_animation, ":agent_no", ":stand_animation"),
(agent_set_animation, ":agent_no", ":stand_animation"),
(store_random_in_range, ":random_no", 0, 100),
(agent_set_animation_progress, ":agent_no", ":random_no"),
(try_end),
]),
It then seems to be related to module_mission_templates.py, but I don't know what to do over there..