Hello everyone, I've been developing a faction pack and I want to create special units with the help of scripts. I've looked at the script examples at Factionleader's Toolkit. If I try use first one or second one it gives "cannot cast SimSettlement:FactionUnitData as miscobject" error during compile. If I try use the last one(function) compiler gives errors about "FactionUnitData" script.
I've also tried to figure out how does special unit spawning work. But when I looked at OutpostManager script I couldn't find function with the name "TryToRecruitSpecialUnit". Is it on a child script of OutpostManager?
If anyone knows how to achieve special unit recruitment via scripts I'd really appreciate help.
Edit: Ok, I've found "TryToRecruitSpecialUnit" in SoldierManager script. Compile issues persist though.
Edit 2: I think I'm on the brink of a breakthrough. Only issue in compiler is "cannot cast a miscobject to a simsettlements:factionunitdata, types are incompatible" error.
I've also tried to figure out how does special unit spawning work. But when I looked at OutpostManager script I couldn't find function with the name "TryToRecruitSpecialUnit". Is it on a child script of OutpostManager?
If anyone knows how to achieve special unit recruitment via scripts I'd really appreciate help.
Edit: Ok, I've found "TryToRecruitSpecialUnit" in SoldierManager script. Compile issues persist though.
Edit 2: I think I'm on the brink of a breakthrough. Only issue in compiler is "cannot cast a miscobject to a simsettlements:factionunitdata, types are incompatible" error.
Last edited: