Process for preparing a material comprising linear or branched oligoamides X.Y, more than 90% by number of the ends of which end with one and the same group - M-L 2 -CO-L 1 -A in which M is chosen from CO, NH and O groups, said process comprising a step of polycondensation: (a) of at least one dicarboxylic acid, (b) of at least one diamine, and (c) of at least one modifier compound of formula A-L 1 -CO-L 2 -W, synthesized and isolated beforehand, wherein: A is an associative group comprising a nitrogenous heterocycle; L 1 is a chemical bond or a spacer arm consisting of a saturated or unsaturated, cyclic or non-cyclic hydrocarbon-based chain optionally interrupted with one or more oxygen and/or nitrogen atoms; L 2 is a saturated or unsaturated, non-cyclic hydrocarbon-based chain containing at least 4 carbon atoms, optionally interrupted with one or more oxo groups and optionally substituted with one or more -OH groups and/or one or more chlorine atoms; W is a reactive group capable of reacting: - either with the amine functions of the diamine, the molar ratio of the acid functions of the diacid to the reactive functions of the modifier compound ranging from 1 to 8, it being understood that the number of moles of amine functions of the diamine is equal to the sum of the number of moles of the abovementioned acid and reactive functions, - or with the acid functions of the diacid, the molar ratio of the amine functions of the diamine to the reactive functions of the modifier compound ranging from 1 to 8, it being understood that the number of moles of acid functions of the diacid is equal to the sum of the number of moles of the abovementioned amine and reactive functions. (a) of at least one dicarboxylic acid, (b) of at least one diamine, and (c) of at least one modifier compound of formula A-L 1 -CO-L 2 -W, synthesized and isolated beforehand, wherein: A is an associative group comprising a nitrogenous heterocycle; L 1 is a chemical bond or a spacer arm consisting of a saturated or unsaturated, cyclic or non-cyclic hydrocarbon-based chain optionally interrupted with one or more oxygen and/or nitrogen atoms; L 2 is a saturated or unsaturated, non-cyclic hydrocarbon-based chain containing at least 4 carbon atoms, optionally interrupted with one or more oxo groups and optionally substituted with one or more -OH groups and/or one or more chlorine atoms; W is a reactive group capable of reacting: - either with the amine functions of the diamine, the molar ratio of the acid functions of the diacid to the reactive functions of the modifier compound ranging from 1 to 8, it being understood that the number of moles of amine functions of the diamine is equal to the sum of the number of moles of the abovementioned acid and reactive functions, - or with the acid functions of the diacid, the molar ratio of the amine functions of the diamine to the reactive functions of the modifier compound ranging from 1 to 8, it being understood that the number of moles of acid functions of the diacid is equal to the sum of the number of moles of the abovementioned amine and reactive functions. - either with the amine functions of the diamine, the molar ratio of the acid functions of the diacid to the reactive functions of the modifier compound ranging from 1 to 8, it being understood that the number of moles of amine functions of the diamine is equal to the sum of the number of moles of the abovementioned acid and reactive functions, - or with the acid functions of the diacid, the molar ratio of the amine functions of the diamine to the reactive functions of the modifier compound ranging from 1 to 8, it being understood that the number of moles of acid functions of the diacid is equal to the sum of the number of moles of the abovementioned amine and reactive functions.