Skip to content
User Avatar
#3943
Auto-translated

Simsa,
1 and 2: Use SetObjectEnabled("object", true (it works as intended) or false (it becomes like static scenery that can be interacted with)), after which you can place a touch trigger (OBJECT_TOUCH_TRIGGER) on the object that will call a function, which will handle quests and dialogues.

3.
1) If there is a quest to save a hero, it needs to be reworked into a "dummy" quest (switch to OBJECTIVE_KIND_MANUAL if it was switched), i.e., make the quest fail only through a script based on some condition, and not technically, otherwise the scenario will always play out. Also, to make quests fail without ending the map, you must always set Ignore = true in the quest skeletons.
2) Regarding teleporting the hero in case of a loss: Put the main hero into the player's reserve, remove him from the map because the reserve hero should not be on it initially. At the beginning of the plot, place him on the map using a script (DeployReserveHero("scripted hero name", x, y, z where to place)) + you can also rotate him using the function SetObjectRotation("scripted hero name", degrees (counterclockwise)). Before that, write a trigger for the player losing heroes and a function that will be launched, in which we will track that if the player lost the specific hero, we will put him back on the map in another location (also through DeployReserveHero), give him the necessary army, and then do whatever you want. I recommend giving the reserve hero at least some army by editing his parameters; otherwise, when he spawns, a random army will be generated based on his specialization.

4. Yes, you can use a trigger to track changes in the status of quests to see which quest has its status changed to "completed," and upon fulfilling the condition, use the function to make the desired object SetObjectPosition().

5. You can spawn dwellings for units, static objects, resources, artifacts, creatures, caravans, and heroes (from the reserve). You cannot manipulate mines except to change their owners and turn their standard visits on/off using SetObjectEnabled. Only turning on/off works for objects that give bonuses. Regarding deleting created static objects, I don't know because I haven't worked with this functionality.

Всякое/карты:

Добавление недостающей музыки гномам