Skip to content

Scripts for beginners.

User Avatar
#174
Auto-translated
Hello everyone.

Does anyone know if there's a script that allows you to change the creatures available for recruitment at outposts during gameplay? I'm talking about the dwellings of creatures of levels 4-7 that are located on the map. In the map editor, when you place such a dwelling, you can specify in its properties which creature of levels 4-7 will be available for recruitment. Is there a command to do the same thing with a script during the game? For example, druids are recruited in a dwelling, and after the script runs, druids are no longer recruited, but dragons are recruited instead.

Or, at least, is there a command that controls the number of recruited creatures? Something similar to "SetObjectDwellingCreatures," but for a dwelling located outside the city. Maybe I'm using "SetObjectDwellingCreatures" incorrectly? I'm using it like this: "SetObjectDwellingCreatures( "altdwell", CREATURE_BLADE_JUGGLER, 50 );"
It works fine for cities, but when I try to apply it to an "outdoor" dwelling, the script gives an error, something like "altdwell" is not a town object.

Thank you in advance if anyone can share some helpful information.