I got a problem regarding "set relation" command
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
I got a problem regarding "set relation" command
I have problems regarding this command:
$ship = set relation against $target to [Foe]
Situation: A wing of fighters is to attack some target. To asure the ships will kill the target, I set the relation of every ship in the wing via upper command to [Foe].
Everything is fine, when ships belonging to the player are commanded.
For example: My wing should attack an Argon transporter. Player notoriety to Argons is somewhere around +500.000. So, the Argons are friendly to me.
When executed, the transporter switches it's color to red -as it should be-, and the wing performs the kill.
BUT, when I try the same for NPC ships, for example a pirate wing should kill a boron transporter, the ships will not change the relation!!!??!
The ships AI in the wing is already switched off by following:
[THIS]-> set race logic control enabled to [FALSE]
[THIS]-> disable ship rebuild
[THIS]-> set StartAction enabled to [FALSE]
So, I should have full control over this pirate wing. Nevertheless I am not able to change the relation to the Boron transporter to foe, it remains neutral all the time. With the result, that the Pirate wing simply follow that transporter like little puppies all the time.
Does anyone know something about this behaviour? Where is the fault?
$ship = set relation against $target to [Foe]
Situation: A wing of fighters is to attack some target. To asure the ships will kill the target, I set the relation of every ship in the wing via upper command to [Foe].
Everything is fine, when ships belonging to the player are commanded.
For example: My wing should attack an Argon transporter. Player notoriety to Argons is somewhere around +500.000. So, the Argons are friendly to me.
When executed, the transporter switches it's color to red -as it should be-, and the wing performs the kill.
BUT, when I try the same for NPC ships, for example a pirate wing should kill a boron transporter, the ships will not change the relation!!!??!
The ships AI in the wing is already switched off by following:
[THIS]-> set race logic control enabled to [FALSE]
[THIS]-> disable ship rebuild
[THIS]-> set StartAction enabled to [FALSE]
So, I should have full control over this pirate wing. Nevertheless I am not able to change the relation to the Boron transporter to foe, it remains neutral all the time. With the result, that the Pirate wing simply follow that transporter like little puppies all the time.
Does anyone know something about this behaviour? Where is the fault?
Most annoying answer: I do not know!
I wrote a little test script, which will switch relations of two objects. By pressing a hotkey, I am able to choose two objects in the universe, then the relations will be switched back and forth. So I do not remember, which particular ship that was.
But this does not matter, as I tried many ships, including M2s and stations. Now there COULD be a serious pirate infiltration problem in my universe, but I strongly doubt it....
It almost seems to me, that this command is only working well for changing relations of player owned objects to objects belonging to other races. I'll upload my example later for anyone interested to test.
I wrote a little test script, which will switch relations of two objects. By pressing a hotkey, I am able to choose two objects in the universe, then the relations will be switched back and forth. So I do not remember, which particular ship that was.
But this does not matter, as I tried many ships, including M2s and stations. Now there COULD be a serious pirate infiltration problem in my universe, but I strongly doubt it....
It almost seems to me, that this command is only working well for changing relations of player owned objects to objects belonging to other races. I'll upload my example later for anyone interested to test.
Here the promised link
You have to use fake patch method. A hotkey called 'TEST CHANGE RELATION' will be added.
On hotkey press, you will be asked wether to run the main task on
1) Playership
2) as a global task
3) on some other object
then you will be asked for two objects to change relations. The result will be output in the logfile nr 8510.
You have to use fake patch method. A hotkey called 'TEST CHANGE RELATION' will be added.
On hotkey press, you will be asked wether to run the main task on
1) Playership
2) as a global task
3) on some other object
then you will be asked for two objects to change relations. The result will be output in the logfile nr 8510.