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 » Fri May 31, 2019 8:06 pm

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: 249
Joined: Fri May 15, 2015 5:57 pm

Re: Help with traits and how to activate them

Post by Graion Dilach » Mon Jun 03, 2019 5:39 pm


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

Re: Help with traits and how to activate them

Post by Wilmatron » Tue Jun 04, 2019 3:19 pm

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