Making a scenario using "Regicide" type of victory
- Loewenherz
- Posts: 244
- Joined: 23 Sep 2017, 17:26
- Has thanked: 7 times
- Been thanked: 21 times
Re: Making a scenario using "Regicide" type of victory
Simply set as victory condition "Script say it so". Then it work.
List of tutorials, useful threads and utilities (look here before posting): Here
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Re: Making a scenario using "Regicide" type of victory
If set “script say so’, than scenario can’t be finished (AI players stay at the Diplomacy panel)
- Loewenherz
- Posts: 244
- Joined: 23 Sep 2017, 17:26
- Has thanked: 7 times
- Been thanked: 21 times
Re: Making a scenario using "Regicide" type of victory
That is normal. You must script it, what the AI doit. In all EE2 scenarios the ai are on "off" and are completely scripted.
Last edited by Loewenherz on 15 Jul 2018, 22:05, edited 1 time in total.
List of tutorials, useful threads and utilities (look here before posting): Here
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
- Dr.MonaLisa
- High Representative
- Posts: 8726
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: Making a scenario using "Regicide" type of victory
Fixed, thanks.
Are you sure it happens after the double check? PlayerInGame() and !IsPlayerHumanControlled()?
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Re: Making a scenario using "Regicide" type of victory
Even if I code victory conditions, how the “script say so” setting will prevent “not AI” errors?
Added after 4 minutes 2 seconds:
Hm, didn’t know about PlayerInGame. How can it help and where to isert it?
Added after 4 minutes 2 seconds:
Hm, didn’t know about PlayerInGame. How can it help and where to isert it?
- Dr.MonaLisa
- High Representative
- Posts: 8726
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: Making a scenario using "Regicide" type of victory
Missed my post? viewtopic.php?p=24002#p24002
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Re: Making a scenario using "Regicide" type of victory
Yep)
Added after 7 minutes 43 seconds:
So it’s like
Added after 7 minutes 43 seconds:
So it’s like
Code: Select all
ACTION KingDeadAction2
SCRIPT WORLD
if (PlayerInGame(2)){
if(!IsPlayerHumanControlled(2)){
SetAIDiplomacyEnabled(2,true);
ForceSurrenderOffer(2, 1);
SetAIDiplomacyEnabled(2,false);
}
else {
...
- Loewenherz
- Posts: 244
- Joined: 23 Sep 2017, 17:26
- Has thanked: 7 times
- Been thanked: 21 times
Re: Making a scenario using "Regicide" type of victory
On my pc that scenario work on "Script say it so". I would say, that you finish it on this victory condition.
My advice new rules or actions you can test wonderful in the Boston mission from Mad doc.
My advice new rules or actions you can test wonderful in the Boston mission from Mad doc.
List of tutorials, useful threads and utilities (look here before posting): Here
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Add Pics to Map: viewtopic.php?f=54&p=25184#p25184
Loews Work: viewtopic.php?f=54&t=5160
Re: Making a scenario using "Regicide" type of victory
Did you finish playing the whole scenario? How lond did you play?
- Dr.MonaLisa
- High Representative
- Posts: 8726
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: Making a scenario using "Regicide" type of victory
Could be something like:Bogdan wrote: ↑15 Jul 2018, 22:16 Yep)
Added after 7 minutes 43 seconds:
So it’s like
Code: Select all
ACTION KingDeadAction2 SCRIPT WORLD if (PlayerInGame(2)){ if(!IsPlayerHumanControlled(2)){ SetAIDiplomacyEnabled(2,true); ForceSurrenderOffer(2, 1); SetAIDiplomacyEnabled(2,false); } else { ...
Code: Select all
if ((PlayerInGame(2)) && (!IsPlayerHumanControlled(2))){
SetAIDiplomacyEnabled(2,true);
ForceSurrenderOffer(2, 1);
SetAIDiplomacyEnabled(2,false);
}
Code: Select all
if (PlayerInGame(2){
if (!IsPlayerHumanControlled(2)){
SetAIDiplomacyEnabled(2,true);
ForceSurrenderOffer(2, 1);
SetAIDiplomacyEnabled(2,false);
}
}
Those are pretty common operations, used in almost every programming language. So it's worth to learn it 1 time, and will be used everywhere else.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains