I couldn't find a way in the documentation, but there ARE 107 mentions of "trait" in the document alone so maybe I just missed it.
Basically, I'd like to prevent the construction of grenadiers and rocket infantry until later, and the player isn't allowed to construct a base, so they can't unlock it by themselves. I'd rather have the option invisible until a certain time period, so I've disabled E2 and E3 for now.
On a similar note that I'm not sure belongs here, I also want Nod to only open fire on civilians in their final wave.
Is there a way to modify traits with Lua? [Impossible]
Yeah, it seems impossible. Just switch factions and hide them behind offsite buildings you spawn for prereqs.
-
- Posts: 6
- Joined: Sun Mar 20, 2022 11:25 pm
Is there a way to modify traits with Lua? [Impossible]
Last edited by xX_Pokeman2003_Xx on Wed Mar 23, 2022 4:29 pm, edited 1 time in total.
Re: Is there a way to modify traits with Lua?
You could use an invisible actor as a prerequisite for E2 and E3, then spawn it in lua whenever you please
-
- Posts: 6
- Joined: Sun Mar 20, 2022 11:25 pm
Re: Is there a way to modify traits with Lua?
Is this really the only way? Oh well... I guess I could do that.
Re: Is there a way to modify traits with Lua? [Impossible]
If it's purely time based, you could have an untargetable invisible actor off map that slowly trickles down in health, and when it dies, it removes the prerequisite. I think you can require negations of prerequisites. If not, just make that first invisible actor spawn an actor upon death that provides the desired prerequisite.