Page 1 of 1

Create and deploy an unit based on an event

Posted: Sun May 03, 2020 4:18 am
by ncc1701e
I see these Forming armies in the USSR deployment window.

What I would like to do is create and deploy an unit two turns after an event has occurred.
Is it possible?

Perhaps it is not possible to deploy automatically an unit, creating it only will be fine too.

Thanks

RE: Create and deploy an unit based on an event

Posted: Sun May 03, 2020 7:04 am
by PanzerMike
You can use giveUnit. But so far I have not seen the possibility to postpone execution of a script dependent on a flag or event plus a number of turns.

The scripts check every turn and if the conditions are met, it executes without delay. There may be workarounds, but it is not standard functionality AFAIK.

RE: Create and deploy an unit based on an event

Posted: Sun May 03, 2020 1:00 pm
by ncc1701e
Thanks Mike. But, the Red armies are not coming all in the same turn after war declaration. Is it obliged to see Forming, for this unit, in the Deployment window if I am using this giveUnit command?

Thanks

RE: Create and deploy an unit based on an event

Posted: Mon May 04, 2020 1:05 pm
by AlvaroSousa
$GiveUnit just puts the unit on the map at X,Y location at specific date in specific conditions. That's it.

Units don't go to the deployment queue.

Only way you can pop them there is if the $GiveUnit doesn't find a valid spot to place them. Then it puts them on the deployment queue.

RE: Create and deploy an unit based on an event

Posted: Mon May 04, 2020 1:13 pm
by PanzerMike
Ok, did not know that. Maybe put that in the manual.