Quote from: Ty294 on September 04, 2022, 08:12:41 AMOh, I should have noted that the FleeLikeAHero line I added myself, that was the a new addition. The rest is a combination of the two defaults.
Anyway, so I think maybe there were some misunderstandings going on here in this thread. So Bluetothestars is talking about the unit in the actual hero slot, not necessarily the hero units, if I'm not mistaken? While I think Anthony was talking about the hero odf classes, but not the actual slot in the LUA they are put in.
Case in point here, I just went and tried putting my jedi unit in the hero slot, and it does the hero kneel down thing, even though it literally just had the regular death animation when it was in a trooper slot. So I decided to try adding the lines in the LUA, and in order cross-reference to see if they worked, I had one of them set a regular trooper in one of the common slots to do the kneel down.Code SelectSetClassProperty("pct_inf_hero", "FleeLikeAHero", "0")
SetClassProperty("pct_inf_assault", "FleeLikeAHero", "1")
So that assault trooper is in the "sniper" slot. While the hero unit is the one set to be a hero.Code Selectsniper = { "pct_inf_assault",1,4},
SetHeroClass(IMP, "pct_inf_hero")
The LUA override works and makes the assault trooper kneel when killed, but it doesn't not affect the hero, which still kneels down like a normal hero. That same pct_inf_hero unit, if I remove it from the hero slot and put it into a common trooper slot, will do the regular death animation. I did several switches of different units and whatever unit is set as the hero class will always kneel. I even just copied the trooper in the rifleman slot so that it was in both the rifleman slot and the hero slot, and just being in the hero slot causes it to kneel down.
In other words, I think any unit that is put in the "SetHeroClass" slot will always kneel no matter what. I don't know if there is a different way to override that or not.
Hopefully all that rambling makes sense!
Oh my god, thank you so much for this! That's what I meant this whole time! The heroes in the hero slots always kneel no matter what, so I did do everything right but it seems to be hard coded into the game. Thank you so much for your help