Posts from Scripts
Auto-translated
I've already tried two options, both with a custom name and with the in-game name, and there's no difference.
Added 1 minute ago
This was also present in the original campaigns and in the Unicorn Empire campaign, in the 4th mission.
Added 5 minutes ago
Do you need a trigger for this?
You just need to give the hero of the player who is not on the map a script. And the name in the script, otherwise I suspect that you entered the in-game name in a completely literal sense. For example, you need to write Arantir, and not Arantir when referring to Arantir in the script.
SetObjectOwner("Nemor", PLAYER_5);
EnableHeroAI("Nemor", nil);
SetObjectEnabled("Nemor", nil);
DoNotGiveTurnToPlayerAIIfNoTownsAndActiveHeroes(5, true);and in the map settings, set player 5 to PCOLOR_NEUTRAL; that will be exactly what you need.
I was making a map and a question of this nature arose:
Is it impossible to build bridges?
I tried two ways:
1. via CreateStatic
2. I placed them with the orientation already set where they should be, then moved them to reserve (the corner of the map) and used the SetObjectPosition function to place them when needed
these methods do not allow the bridge to be used; it's just an object that the hero passes through
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
Added 1 minute ago
If it's not too much trouble, could you describe what the scripts are in the last line? I'm curious.
In general, it's quite strange.
Kiom, did you use the correct object for the bridge? Which bridge exactly, underground or above ground? If you place the bridge from the very beginning, can the hero walk across it without any problems?
In general, it's strange.
I placed it as a regular bridge (above ground, Order faction), and the hero could walk across it (after moving it with the SetObjectPosition command, it stopped working as a bridge; perhaps the path coordinates were messed up). When you place three parts of the bridge in the editor, it automatically transforms into 1 object with 1 set of coordinates.
P.S. Visually, moving the bridge worked as expected, it was a single object, but when trying to walk across it, the hero would pass through it and end up in the water.
Added after 46 seconds
If it's not too much trouble, could you describe what's in the last line of the scripts? I'm curious.
It blocks the hero's path if he doesn't have any active heroes; visually, it's for comfort (in this case)
Multiplayer: Господство, Извечное противостояние, Война за Магию, Торговая империя, Анатомия войны, Эксперимент
SingleScenario: Последний Рубеж, Трон, Элиралис, Вернуться домой!, Лабиринты разума
Campaign: Колонизация
Added 7 minutes later
Oops, here's the script:
SetObjectEnabled("dub1", nil);
SetDisabledObjectMode("dub1", DISABLED_INTERACT);
sleep(1)
SetMonsterSelectionType("dub1", 0);
What's wrong with the script? "dub1" is the name of the entity; the script's purpose is to prevent interaction with the entity and to remove the faction circle.
Added 7 minutes later
Oops, here's the script:
SetObjectEnabled("dub1", nil);
SetDisabledObjectMode("dub1", DISABLED_INTERACT);
sleep(1)
SetMonsterSelectionType("dub1", 0);
Try placing sleep(1) before SetDisabledObjectMode; this might be the issue.