Skip to content
#75
Auto-translated
Oh, you've taken on some complex scripts, and now no one but you can help. I once tried to create something similar, but nothing worthwhile came of it. Here's a simpler approach:
function primer()
while 1 do
if HasArtefact ("Isabell",ID_86) then
ChangeHeroStat ("Isabell", STAT_EXPERIENCE, 12000);
MessageBox ("/Maps/SingleMissions/Let's go!/runa.txt");
sleep( 3 );
Trigger(OBJECT_TOUCH_TRIGGER, "primerreg", nil );
end;
sleep( 3 );
end;
end;
Trigger(OBJECT_TOUCH_TRIGGER, "primerreg", "primer");

while do is a loop in the C++ language, which is actually used in the game. 1 means it runs once and then stops. In all the developer's scripts, 1 is used; draw your own conclusions and experiment.

It should work like this. If the condition is met, it triggers; if not, it doesn't. You can try using else, or rather, elseif. But again, the tree will only trigger once. And once the artifact is obtained, the script will no longer work. Therefore, you'll have to come up with something more complex.

And yes... ChangeHeroStat seems to work differently; I'll take a look at it sometime and let you know if it doesn't work as expected.

Statistics

Welcome our newest member: Emil