Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
I downloaded and opened the script editor for this map, what's next?

Added 4 minutes later
Now the demon won't let me in.

A screenshot of the code is needed. It's probably because you changed the name of an entity, but forgot to replace the new name with the old one in the code.
In reply to John_Lock
User Avatar
Auto-translated
In the script, the creature's name is Devil, and the message file is also named Devil.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
wrote.

And how is it? Does it work?
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
still the same

And what is the current text of your script?
User Avatar
Auto-translated
Decided not to write the whole text yet, just in case it doesn't work. I wrote: a splinter in your ass (:

Added 1 minute ago
just for fun.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
Decided not to write the whole text yet, just in case it doesn't work. I wrote: a splinter in your ass (:

Added 1 minute ago
just for fun.

Try starting with the simplest one. For example, just to display a message.
In reply to John_Lock
User Avatar
Auto-translated
In other words, should I not write any text at all, just create an empty file?

Added 5 minutes later
Still no message. File name: Devil.txt Creature name: Devil Hero name: Nikolai The script itself: function Heroes() Trigger(OBJECT_TOUCH_TRIGGER, "Devil", nil); AddHeroCreatures("Nikolai", 3, 20); MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt"); PlayObjectAnimation("Devil", "happy", ONESHOT_STILL); end; Trigger(OBJECT_TOUCH_TRIGGER, "Devil", "Heroes"); SetObjectEnabled("Devil", nil);
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
So, basically, not write any text but just have an empty file?

No, I mean this:

function "your name"()
MessageBox("/Maps/SingleMissions/Your map/Your text file.txt");
end;

Trigger(OBJECT_TOUCH_TRIGGER, "any object name", "your function name");
User Avatar
Auto-translated
I'll try now.

Added 3 minutes later
Right now, nothing is happening at all.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
I'll try now

Added 3 minutes ago
Right now, nothing is happening.

Copy the code and show it; otherwise, it's not clear.
In reply to John_Lock
User Avatar
Auto-translated
function Heroes()
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", nil);
AddHeroCreatures("Nikolai", 3, 20);
MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt")

Added 3 minutes ago
stop, I think I understand the error now, I'll fix it

Added 1 minute ago
AddHeroCreatures("Nikolai", 3, 20);
function Heroes()
MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt");
end;
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", "Heroes");
User Avatar
Auto-translated
function Heroes()
Trigger(OBJECT_TOUCH_TRIGGER, "Devil", nil);
MessageBox("/Maps/SingleMissions/Opolchenie/Devil.txt");
AddHeroCreatures("Nikolai", 3, 20);
end;

Trigger(OBJECT_TOUCH_TRIGGER, "Devil", "Heroes");

Added 5 minutes later
How? Did it work?
User Avatar
Auto-translated
While I was trying to insert the script, the editor crashed twice, and it still doesn't work.
In reply to &T&T&Twreqnd
User Avatar
Auto-translated
&T&T&Twreqnd
While I was trying to insert the script, the editor crashed twice, and it still doesn't work(((

I'll try writing the simplest script now.

function latnikF()
LevelUpHero("Nikolai");
end;
Trigger(OBJECT_TOUCH_TRIGGER, "latnik", "latnikF");

SetObjectEnabled("latnik", nil);

Place any creature. And in the Name field, write "latnik". There's another error. . You are using the wrong hero name.

If the map editor crashes, and this is normal for it, then use ScriptEditor. Open your map, find MapSkript.lua there, and edit it.
Attachments 1
1 file attached • Total size: 266.2 KB

Statistics

Welcome our newest member: Emil