Skip to content

Scripts for beginners.

User Avatar
#416
Auto-translated
Azgalor
Yes, I noticed it already. Well, I overlooked it. By the way, I launched the map, and the script works. It freezes for about 5 seconds, and then starts a combat with a neutral Sinithar with 10 dragons in his army. That's what's happening 👀
The StartCombat command works, but I want actions to happen inside the battle (the idea was to cast Armageddon in the end). Right now, there's just a simple command in the Start function to increase mana, which doesn't work, and the print statement I added to display in the console confirms that it's being executed within the combat script. The lag probably comes from the function that determines the race and then assigns a castle to half of the players based on that determination. Plus, there's the immediate destruction of the current starting castle, which I think is causing the initial slowdown. I don't know how to optimize it yet.

Added 14 minutes later

Right now, the white text in the console is worrying: Warning: scripts are not allowed - this might be the answer, that some kind of permission is missing for this script to work. And this line appears right at the beginning of the battle.

Ещё только учусь =)