Skip to content

Scripts for beginners.

User Avatar
#408
Auto-translated

}{0TT@6bI4
Try specifying the full path without concatenations, starting with a forward slash. Specifically, "/Maps/SingleMissions/..." Without using GetMapDataPath(). I remember encountering this issue because in S.T.A.L.K.E.R., the main combat script is linked in this way.
I tried moving this section directly into MapScript.lua. The result is as follows:
DeployReserveHero("Inagost", 115, 290, 0);
sleep(1);
p3heroname = GetPlayerHeroes(3)[0];
print(p3heroname);
ChangeHeroStat("Inagost", 0, 90000);
SetHeroCombatScript(p1heroname, "/Maps/Multiplayer/Grand_Duel/DragonCombat.xdb#xpointer(/Script)");
sleep(1);
StartCombat(p1heroname, "Inagost", 1, 84, 10, nil, nil, nil, nil);

I commented out the other starting functions. As a result, the hero is moved from the reserve, but it still doesn't enter the script. There's a print("open DragonScript") statement for testing. The console is silent, but this line warning: script are not allowed is concerning; the screenshot is attached. Perhaps something is missing, or some settings are needed for the script to work? I'm at a loss (But generally, some warnings kept popping up, and everything else worked.

Regarding the answers to points 1) and 2), thank you very much! I edited the map in map.xdb and quickly found the lines with the incorrect coordinates using the object names. Now everything is aligned, and it looks great. Regarding TalkBoxForPlayers, I'm currently studying how it works and have tested the output; I've implemented it. I just need to finalize it; this option looks much better and more elegant for my purposes.

Attachments 1
1 file attached • Total size: 27.0 KB
Ещё только учусь =)