Page 1 of 1
Event Trigger Question for Dev
Posted: Sun Apr 20, 2025 10:56 am
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 ?

Re: Event Trigger Question for Dev
Posted: Thu May 15, 2025 2:35 am
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.
Re: Event Trigger Question for Dev
Posted: Tue Jul 22, 2025 10:32 am
by ChrisGb
Sabranan wrote: Thu May 15, 2025 2:35 am
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.
I never was aware of this response, just find it now after searching the topic in the search function.
Thank you very much, even is very late...found this condition tag couple weeks after my original question but abandoned the idea that triggered it.
Como back to it eventually later
