Skip to content

Posts from Question about scripts. Auto-translated

No ratings yet — be the first to rate!
#1
Auto-translated

Hello everyone, I decided to try creating my first map. I would appreciate it if someone could share some information; I have two questions:

1. How do I block one of the upgrades in a castle? (For example, so that humans in the castle only have red unit types).
2. How do I create a script so that heroes appear on a specific day, and how do I correctly write this into quests so that when the first enemy appears, an additional quest is triggered.
I'm still a beginner; today is my first day learning all of this. Thank you!



Added after 20 hours 59 minutes

I've figured out those questions; the problem is something else:

From the "MapScriptsEditor," scripts are not transferred to the built-in editor. Consequently, I rewrote the script in this editor, but it didn't update in the map. As I understand it, the problem is that there is no MapScript.xdb file in my map in this editor.
And, accordingly, I can't do anything in the built-in editor because in 99.9% of cases, it crashes, and data from the second editor is not transferred to the map...

User Avatar
#2
Auto-translated
By default, it should be there:
1. In map.xdb, a reference to MapScript.xdb of the form
<MapScript href="MapScript.xdb#xpointer(/Script)"/>
2. In MapScript.xdb, a reference to MapScript.lua of the form
<?xml version="1.0" encoding="UTF-8"?>
<Script>
    <FileName href="MapScript.lua"/>
    <ScriptText/>
</Script>
3. In MapScript.lua, the corresponding code.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо