Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
Auto-translated
There might be a more elegant solution (without rotations) – this can be achieved with the help of 2 peasants running towards each other (but with a time delay) – then the player will have the illusion that it is the same character running back and forth (although in reality, they are two twin brothers).
Generally, this is something worth trying. antonag gets a plus for creativity.
 

К А
Стикеры GBF в Telegram
Auto-translated
How can I prevent a hero stationed in a Castle from building structures, recruiting heroes in the tavern, and hiring soldiers?
User Avatar
Auto-translated
Just leave him with only the Castle building and that's it. :)
Regarding him appearing: Are you sure you did everything correctly? If not, there's another option: surround him with regions so that there's no way through, and for each region, write in the script: SetRegionBlocked('region name', true, player number);
 

К А
Стикеры GBF в Telegram
Auto-translated
Thank you! I figured out the issue with the castle. It was my mistake. Regarding buildings: if I capture a town, will it then be empty, and will I need to develop it further? Can this be done using scripts?
User Avatar
Auto-translated
I would try using this function: SetTownBuildingLimitLevel(townName, buildingID, limit);
That is, call it after capturing the town, and the building that was previously impossible to construct will become constructible. Something like that.
------
Or, disable the town using SetObjectEnabled('town name', nil); and then unlock it when attacked.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
Auto-translated
Ment
Overall, it's an interesting idea, and I'll give antonag a plus for creativity.
I still don't understand: if a monster just runs in place, how does it move through space?
Auto-translated
How can I manually deploy troops for the neutral army in the game?
Otherwise, it deploys only 1 peasant at a time.
In reply to ARA
Auto-translated
ARA
How can I, as a player, deploy troops like in a neutral army?
Otherwise, he deploys only 1 peasant for me.

Do you mean you want to create a mixed army (besides the peasant, there will also be, for example, archers, griffins, monks...)?

Added 1 minute ago
Oligarch
I still don't understand: if a monster just runs in place, how does it move in space?

It runs from point x(x;y) to point y(x;y) (these coordinates are what you set).
In reply to antonag07
Auto-translated
Absolutely!

He didn't accept a simple "yes" as an answer.
In reply to ARA
Auto-translated
ARA
Absolutely!
Then, you select the desired monster, look at the properties window, and find "AdditionalStacks." Right-click on it, choose "add," and a new tab will open, where you can add any creatures (i.e., you can mix races and add neutral creatures to this mixed group).

When you add two or more types of creatures to the squad, the circle under the flag will immediately change its radius – this will indicate that the mixing operation was successful.
Auto-translated
Thank you!
I've figured everything out.
In reply to antonag07
User Avatar
Auto-translated
antonag07

he runs from point x(x;y) to point y(x;y) (you define these coordinates).
I wrote this script; the peasant runs 3 meters and then teleports back. How can coordinates be specified there?
In reply to Олегарх
User Avatar
Auto-translated
Is it possible to change the lighting during gameplay?
Auto-translated
Yes, I think so. You can check it in the C5M5 of the original game. I think when you kill all the ghosts or collect all the phoenixes, the light changes to a brighter one. I can't tell you the script right now, but I'll post it when I find it. You can probably find it on Novik's website, in the Hugo section.
Best regards.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война
User Avatar
Auto-translated
You are right, such a script does exist:
SetAmbientLight(floorID, lightName, fade = false, time = 1); (fade=true if you want the lighting to change gradually; by default, it changes instantly).
 

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

Statistics