Help with traits and how to activate them

Information and discussion for custom maps and mods.
Post Reply
Wilmatron
Posts: 10
Joined: Sat May 25, 2019 10:13 am

Help with traits and how to activate them

Post by Wilmatron »

Hi All,

I thought I'd ask this question as the Traits Wiki page is down at the moment (to which I've commented via an open issue on GitHub)...
I'm looking to have NOD launch a nuke via their Temple (Tiberian Dawn) and the documentation mentions activating the actor's "NukePower" and that it requires a Trait called "NukePower".

How do I provide this Trait? I'm assuming it is through the rules.yaml file, but I'm a little lost as to how to add it to this.
Can somebody point me in the right direction or provide an example of what it should look like?

Cheers,
Dave.

User avatar
Graion Dilach
Posts: 277
Joined: Fri May 15, 2015 5:57 pm

Re: Help with traits and how to activate them

Post by Graion Dilach »


Wilmatron
Posts: 10
Joined: Sat May 25, 2019 10:13 am

Re: Help with traits and how to activate them

Post by Wilmatron »

Hi Graion,

I'm trying to work out how to trigger NOD (the AI enemy) to fire a nuke at the player if the temple is attacked. The API mentions 'ActivateNukePower' and that it requires the trait 'NukePower'. Would you happen to know the line of code i'd need to instigate the attack?

Cheers,

Post Reply