Skip to content

Scripts for beginners.

User Avatar
#181
Auto-translated
It also works on the test Multiplayer map I created, although for this, it needs to be added to the map itself.
Yes, it also needs to be added to the original Multiplayer maps.
In the NHF mod, scripts in Multiplayer are handled this way. And to add these scripts to fan-made Multiplayer maps, they have a special program for that.
Also, there is another small bug: when a hero captures a dwelling, the recruitment window immediately pops up, but the question about rebuilding appears only after the hero exits this window. Thus, in the case of rebuilding, the hero gets the opportunity to recruit from both the original and the alternative building, and that's exactly what happens. Does anyone have any ideas on how to solve this problem? "Disabling" the buildings until the player touches them is also not an option, because in that case, the AI will ignore these buildings.
And doesn't the function for changing the Value object for the AI work in such cases?
And another question, (probably even more noobish than the others, please forgive me) do all these scripts significantly load the game?
And does it depend on the length of the assigned values, i.e., should I make the assigned names as short as possible, or does it not matter at all?
The names are unlikely to load anything. But in general, scripts do load the game, yes. It depends on the specific case, of course, but in general, you can conduct an experiment by setting up some large cycle and looking at the execution time.
However, without large cycles, you are unlikely to notice that the script takes a long time to execute.
 

К А
Стикеры GBF в Telegram