Hi, I made a mission trigger in a battle that when an NPC health drops to a certain point, for 2 "gore"
npcs to be spawned in place and the original NPC to be teleported elsewhere in order to create a dismemberment effect.
It all works fine until the NPCs health drops to the low point, the game just crashes. I have no idea whats wrong, the RGL log says nothing and my MS also doesnt say theres any problem. Please help
It seems like spawning agents in battles is causing crashing. anyone know why?
npcs to be spawned in place and the original NPC to be teleported elsewhere in order to create a dismemberment effect.
It all works fine until the NPCs health drops to the low point, the game just crashes. I have no idea whats wrong, the RGL log says nothing and my MS also doesnt say theres any problem. Please help
Code:
#ivanmod
gore_checker = (
0.3, 0, 0,
[
],
[
(get_player_agent_no,":plyr"),
(try_for_agents, ":npc"),
(neq, ":npc", ":plyr"),
(agent_is_alive, ":npc"),
(store_agent_hit_points, ":npc_health", ":npc", 0),
(agent_get_troop_id, ":troop_id", ":npc"),
(eq, ":troop_id", "trp_rhodok_veteran_spearman"),
(display_message, "@DEBUG: chieftains present"),
(le, ":npc_health", 30),
(display_message, "@DEBUG: health down to 15%"),
(agent_get_position, pos1, ":npc"),
(entry_point_get_position, pos2 ,50),
(agent_set_position, ":npc", pos2),
(spawn_agent, "trp_goreupper_indoaryanchief"),
(spawn_agent, "trp_gorelower_indoaryanchief"),
(agent_set_hit_points, ":npc", 0, 1), #spawn dead
#(agent_deliver_damage_to_agent,":plyr", ":agent"),
(try_end),
])
It seems like spawning agents in battles is causing crashing. anyone know why?