Event Trigger Question for Dev

Moderator: MOD_DW2

Post Reply
ChrisGb
Posts: 78
Joined: Thu Mar 21, 2024 8:10 pm
Location: Spain

Event Trigger Question for Dev

Post by ChrisGb »

1. How I stop en event from firing if the Race is AI controlled ?
2. How trigger event for Race only if Race=Player ?

Basically to have 2 sets of same event to fire one for Race=AI only, the other for if Race=Player only with slightly diff actions


I tried literally all possible combinations of NonTriggerRaceId, PlacementRaceId, RaceId but no matter what...it always fires anyway for the Race, no matter if AI or Player.
Is this even possible ?
Image
Conquest: Terran Frontier Wars - Return to Terra (Terran Campaign DLC) Summer 2025
https://www.matrixgames.com/forums/view ... 9&t=403676
Image
Sabranan
Posts: 485
Joined: Wed Feb 24, 2016 4:05 pm

Re: Event Trigger Question for Dev

Post by Sabranan »

As far as I'm aware the 255=Player value only applies for PlacementRaceId. In most any other context Race Id 255 would be one of the pirate factions.

There's another way to do this though, you can use a condition. This can be placed on the game event itself or in an individual placement action or individual trigger action, depending on exactly what you need.

So you could use:

Code: Select all

<GameEventCondition>
	<Type>EmpireIsPlayer</Type>
</GameEventCondition>
to set it to only work if the empire is a player one or:

Code: Select all

<GameEventCondition>
	<Type>EmpireIsNotPlayer</Type>
</GameEventCondition>
to set it to work if the empire is an AI one.
Post Reply

Return to “Distant Worlds 2: Tech Support”