Page 1 of 1

#LINK=

Posted: Mon May 13, 2019 5:14 am
by Gilber
HI,

I can't understand how the #LINK= parameter works in a Script Decision.
To test it I made 4 elementary scripts.
In the first script the Decision events 901 takes the value 1
This script is followed by 3 Decision events 902 scripts, each with different trigger conditions #LINK= 901[0], #LINK= 901[1], #LINK= 0[0].
But only the script #LINK= 0[0] is triggered.

Someone understands how the #LINK= parameter works ?

here is the code :

{
#NAME= Décision AI 901[1]
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1
#GV= 1[1,100]

#LINK= 0[0]
; 0[0] = Script toujours Activé

#DECISION= 901

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 0[0] -----> 901[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}






{
#NAME= Décision AI 902[1] +
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1
#GV= 1[1,100]

#LINK= 901[1]


#DECISION= 902

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 901[1] -----> 902[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}






{
#NAME= Décision AI 902[1] ++
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1

#GV= 1[1,100]

#LINK= 901[0]


#DECISION= 902

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 901[0] -----> 902[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}






{
#NAME= Décision AI 902[1] +++
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1
#GV= 1[1,100]

#LINK= 0[0]


#DECISION= 902

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 0[0] -----> 902[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}



Image

RE: #LINK=

Posted: Mon May 13, 2019 5:20 am
by Gilber
The Previous image wasn't the good one
this one is correct

Image

RE: #LINK=

Posted: Mon May 13, 2019 6:18 am
by El Condoro
It is one of the conditions that needs to be met for a script to fire, along with any others set.

So if Decision 901 is the decision script:

If DE 902 has #LINK= 901[1] then the response to DE 901 has to be YES for it to fire.
If it has #LINK= 901[0] then the response has to be NO for DE 902 to fire, if all other conditions are met.

Is that what you mean?

RE: #LINK=

Posted: Wed May 15, 2019 6:33 am
by Gilber
HI,

yes you are right.

All options except the #LINK= parameter are dummy conditions.
The first script sets decision 901 to 1 (true)
As confirmed by the message LINK= 0[0] -----> 901[1] = True
From the line #AI_RESPONSE_POPUP= LINK= 0[0] -----> 901[1] = True
But if in the following script we test the value 901 by the line #LINK= 901[1] (the other conditions are dummy conditions) The script does not trigger.
It also does not trigger with condition #LINK= 901[0] (the other conditions are dummy conditions)
So with dummy conditions we have a script that does not trigger with #LINK= 901[0] or #LINK= 901[1].

I don't see how to explain this result.

Gilles

RE: #LINK=

Posted: Wed May 15, 2019 8:45 am
by El Condoro
You have #COUNTRY_ID= 45 (Axis, Germany) and #AI= 2 (AI games and only on Allied turn). I suspect it might work on #AI= 1 (AI games on Axis turn) but I haven't checked it.

RE: #LINK=

Posted: Wed May 29, 2019 5:34 am
by Gilber
Hello El Condor,

there are two scripts that work with #AI= 2 and #COUNTRY_ID= 45 so I don't think the problem comes from those conditions.

Gilles