Skip to content

Posts from Scripts

4.8 (8 ratings)
Auto-translated
Jack_of_shadows, I've tried it both with and without the slash, but it still doesn't work. I want to upload a screenshot, but I don't know how.
User Avatar
Auto-translated
Cirillo, it might be worth checking what the console outputs; it might help to understand what the error is. As for me, I'm not very good at dialog scenes.
User Avatar
Auto-translated
Could you please provide a script that would make a peasant perform an attack animation? I would be grateful.
User Avatar
Auto-translated
I tried it myself, and this is what I got:
Attachments 1
1 file attached • Total size: 294 B
User Avatar
Auto-translated
But nothing works:(
Auto-translated
Orlan-1, in the script itself, the name of the peasants (fermer) should also be enclosed in quotation marks ("fermer").
User Avatar
Auto-translated
orlan-1, in the map archive, there is a special file called MapScript.lua. You need to write the Lua code there; it will be executed when the map starts. In the map editor, there is an option in the menu to edit this file. Also, the first parameter of the PlayObjectAnimation function must be a string. If you gave an object a name in the editor, you need to enclose that name in single or double quotes when passing it to the function.
Auto-translated
Why isn't the effect playing? PlayVisualEffect("/Effects/_(Effect)/Towns/Necropolis/fortfire01.xdb#xpointer(/Effect)","camegn1",0,0,8,0,0);
User Avatar
Auto-translated
It seems like one parameter was missed, tag:
PlayVisualEffect("/Effects/_(Effect)/Towns/Necropolis/fortfire01.xdb#xpointer(/Effect)","camegn1","",0,0,8,0,0);
Auto-translated
How are different effects written, for example, how is it written that a hut or a town is on fire?
Auto-translated
Jack_of_shadows, thank you, it helped!
In reply to Jack_of_shadows
User Avatar
Auto-translated
Jack_of_shadows
orlan-1, there is a special file in the map archive called MapScript.lua; you need to write the Lua code there, and it will be executed when the map starts. In the map editor, there is an option in the menu to edit this file.
Also, the first parameter of the PlayObjectAnimation function must be a string. If you gave an object a name in the editor, you need to enclose that name in single or double quotes when passing it to the function.
What if there is no MapScript.lua file? Can it be created?
User Avatar
Auto-translated
What if there is no MapScript.lua file? Can it be created?
I'm not sure, but it's possible that even if you create it yourself, it won't be recognized because you'll also need to create the accompanying .xdb file. Most likely, if you go to the "Script" section in the map editor (I don't remember the exact name) and write something there, the editor will create this file and all the necessary links to it.
Auto-translated
Could you please explain how the SetObjectiveProgress function works?

Statistics

Welcome our newest member: Emil